Tomcat 5.5: no JDK found
Wednesday, November 28th, 2007
If you install Tomcat 5.5 (or 5.0) in Ubuntu, you may see Tomcat failing to start because JAVA_HOME is not set:
One way to quickly solve this problem is to edit the file /etc/default/tomcat5.5:
Find the section where the JAVA_HOME variable is defined. It should look like this:
Uncomment the line that sets the JAVA_HOME variable, and if necessary provide the java runtime environment of your preference. After editing it should look like this one:
Save the file and try again to start Tomcat, it should be able to start now:
giannis@giannis-desktop:~$ sudo /etc/init.d/tomcat5.5 start
[sudo] password for giannis:
* no JDK found - please set JAVA_HOME
giannis@giannis-desktop:~$One way to quickly solve this problem is to edit the file /etc/default/tomcat5.5:
sudo gedit /etc/default/tomcat5.5Find the section where the JAVA_HOME variable is defined. It should look like this:
# The home directory of the Java development kit (JDK). You need at least
# JDK version 1.4. If JAVA_HOME is not set, some common directories for
# the Sun JDK, various J2SE 1.4 versions, and the free runtimes
# java-gcj-compat-dev and kaffe are tried.
#JAVA_HOME=/usr/lib/jvm/java-6-sunUncomment the line that sets the JAVA_HOME variable, and if necessary provide the java runtime environment of your preference. After editing it should look like this one:
# The home directory of the Java development kit (JDK). You need at least
# JDK version 1.4. If JAVA_HOME is not set, some common directories for
# the Sun JDK, various J2SE 1.4 versions, and the free runtimes
# java-gcj-compat-dev and kaffe are tried.
JAVA_HOME=/usr/lib/jvm/java-6-sunSave the file and try again to start Tomcat, it should be able to start now:
giannis@giannis-desktop:~$ sudo /etc/init.d/tomcat5.5 start
* Starting Tomcat servlet engine tomcat5.5 [ OK ]
giannis@giannis-desktop:~$














