You are not logged in.
OK, I've been around the Linux block a few times but I am learning Arch Linux. So far I really enjoy it.
Here is my problem. I am also learning Java and JSP (using Tomcat). I am a C#/PHP developer by trade.
Anyway, I've done the following:
pacman -S j2sdk
pacman -S tomcat
Both seem to be installed.
But when I try to start tomcat with: /etc/rc.d/tomcat start I get:
11/07/2008 23:22:14 1986 jsvc error: Cannot locate Java Home
OMG I've done everything I can possible imagine. The JAVA_HOME environment var is set to:
/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0
TOMCAT_HOME is set to: /opt/tomcat
Both of those directories appear to be correct....as in, java and tomcat appear on those two respectively.
I am pulling my hair out over this.
It's very frustrating to come from a PHP world where I can install PHP/Apache/Code Igniter in literally 4 minutes and it works every time.
This very well could be a tomcat issue and maybe I should find some tomcat forums but I thought I would start here first.
Thanks for any help.
cbmeeks
Offline
Please try just logging out and back in. That way, the file /etc/profile.d/jdk.sh will get sourced, and your JAVA_HOME should point to /opt/jdk instead of gcc-gcj in /usr/lib/jvm/...
I don't know if gcc-gcj (the /usr/lib/jvm stuff) will still interfere afterward. I'm hoping it won't.
Offline
When you jdk, a file was put in /etc/profile.d/ which will set the JAVA_HOME variable but you haven't sourced it yet. The solution is to source /etc/profile or logout and log back in and this will be fixed.
Offline
Thanks for the reply guys.
I've logged in and out a dozen times and even rebooted the machine.
The only stuff in /opt is tomcat.
I installed the jdk with: pacman -S j2sdk
I'm wondering if I have all of the JDK stuff installed?
Offline
I'm quite sure that jdk is installed to /opt/java. Do you not have that?
Offline
Now I'm getting somewhere!
I reinstalled the jdk with pacman -S j2sdk (again).
This time I have a /opt/java folder
Now when I try to start tomcat it fails but I get no error message.
Offline
NEVERMIND!!
When I rebooted I forgot that I set tomcat to autostart.
IT WORKS!
Installing the j2sdk before tomcat must have screwed something up because I got some "conflicts" after I tried to install the j2sdk again.
THANKS GUYS! You all have been a great help!!!
Offline