LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-21-2006, 10:29 PM   #1
isra_mv
Member
 
Registered: Apr 2006
Location: Mexico
Posts: 55

Rep: Reputation: 15
Tomcat5 doesn't find JAVA_HOME environment variable


I have jdk 1.5 installed and configured, but when I try to run startup.sh in Tomcat it says:

The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program

What can I do to make it recognize the Java path?
 
Old 09-22-2006, 12:15 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

Could you run 'which java' and post the output?
Could you also tell us where Java installed to? (It might be /usr/lib/java-xxx, or /usr/jdk-xxx or something similar)

Dave
 
Old 09-22-2006, 08:55 AM   #3
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Quote from this site: http://www.crazysquirrel.com/computing/debian/java.jspx

Quote:
Dealing with Packages that Require JAVA_HOME

Unlike a lot of packages many (most) Java packages need to know where the Java VM is installed and they do this through use of an environment variable called JAVA_HOME. You can set this for each package or you can set this globally in "/etc/profile". Some packages, such as Tomcat, that are started by an init script will need to know where Java is installed in order to start at boot time. Since they don't run in a shell they don't read "/etc/profile".
 
Old 09-23-2006, 11:40 AM   #4
isra_mv
Member
 
Registered: Apr 2006
Location: Mexico
Posts: 55

Original Poster
Rep: Reputation: 15
It's JDK 1.5.0_06. I installed it using EasyUbuntu (a program to install some packages like drivers, codecs, java, and others), and it's in /usr/lib/jvm/java-1.5.0-sun-1.5.0.06. I use Java and it works fine, but I don't know where is JAVA_PATH.
I didn't find it in /etc/profile or in /home/me/.bashrc
If I uninstall jdk and install it manually, might it work? If it's possible... mmmm... how can I uninstall it if EasyUbuntu is just for installation?
 
Old 09-23-2006, 01:42 PM   #5
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

You'll have to add the following 2 lines to /etc/profile
Code:
JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.06
export JAVA_HOME
Now log out and log back in, and you should be good to go.

Dave
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
my JAVA_HOME environment variable changes automaticly petertavenier Linux - Newbie 3 04-20-2006 02:30 AM
# ./startup.sh Neither the JAVA_HOME nor the JRE_HOME environment variable is defined Niceman2005 Linux - Newbie 3 06-29-2005 01:58 PM
JAVA_HOME Variable yea420 Linux - Software 6 08-29-2004 06:37 PM
environment variable mimi Linux - Newbie 1 04-10-2002 08:29 AM
environment variable mimi Linux - General 2 04-10-2002 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration