LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-28-2010, 03:22 PM   #1
imagine_me2
Member
 
Registered: Nov 2009
Location: Kolkata, India
Distribution: Fedora 11
Posts: 136

Rep: Reputation: 22
Where is JAVA_HOME in Linux


Tomcat installation requires JAVA_HOME to be defined. In Windows it is straight forward. But in Linux binaries are in one folder and libraries are in other folder.

Is there a way to find out where exactly is JAVA_HOME?

Thanks.
 
Old 07-28-2010, 03:28 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Try this link here for a decent explanation: http://www.cyberciti.biz/faq/linux-u...path-variable/

And here's what I set on my system (I set this up some time ago):
Code:
sasha@reactor: which java
/usr/lib64/java/bin/java

sasha@reactor: echo $JAVA_HOME
/usr/lib64/java
The actual folder named "java" on my system, is a symlink, which points to the full-named JRE installation folder:
Code:
sasha@reactor: ls -la /usr/lib64 | grep java
drwxr-xr-x   8 root root     4096 May  8 22:27 java/
lrwxrwxrwx   1 root root        4 May 25 16:16 jre1.6.0_20 -> java/
 
Old 07-28-2010, 04:07 PM   #3
imagine_me2
Member
 
Registered: Nov 2009
Location: Kolkata, India
Distribution: Fedora 11
Posts: 136

Original Poster
Rep: Reputation: 22
"which java" returns "/usr/bin/java". Now /usr/bin cannot be JAVA_HOME, or can it be?
The page you referred contains exactly the same things that you said.

Thanks for the reply.
 
Old 07-28-2010, 09:12 PM   #4
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Try /usr/lib/jvm.
 
Old 07-29-2010, 03:09 AM   #5
imagine_me2
Member
 
Registered: Nov 2009
Location: Kolkata, India
Distribution: Fedora 11
Posts: 136

Original Poster
Rep: Reputation: 22
my /usr/lib/jvm contains many java dirs as:
java java-openjdk jre-1.6.0-openjdk
java-1.5.0-gcj-1.5.0.0 jre jre-gcj
java-1.6.0 jre-1.5.0 jre-openjdk
java-1.6.0-openjdk jre-1.5.0-gcj
java-1.6.0-openjdk-1.6.0.0 jre-1.6.0

almost all are links to other folders mostly /etc/alternatives etc. But "java-openjdk" contains the required java installation inculding binaries. Tomcat in working ok with JAVA_HOME="/usr/lib/jvm/java-openjdk"


Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
setting JAVA_HOME gauravbagga Linux - Newbie 2 03-04-2005 10:17 PM
JAVA_HOME Variable yea420 Linux - Software 6 08-29-2004 07:37 PM
How to set JAVA_HOME in REDHAT 9.0 Linux? tejpatil Linux - Newbie 5 05-23-2004 02:17 PM
How to set JAVA_HOME in REDHAT 9.0 Linux? tejpatil Linux - General 1 05-23-2004 07:32 AM
JAVA_HOME and tomcat mbbender Linux - Software 5 07-07-2003 09:39 PM


All times are GMT -5. The time now is 02:56 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration