my dog learned polymorphism*
The moose likes Beginning Java and the fly likes how to setup JAVA_HOME and JAVA_PATH Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to setup JAVA_HOME and JAVA_PATH" Watch "how to setup JAVA_HOME and JAVA_PATH" New topic
Author

how to setup JAVA_HOME and JAVA_PATH

cake naiyou
Greenhorn

Joined: Apr 29, 2011
Posts: 27
I opened the .bashrc file of an established system, which includes



After typing
, the system prints out


It seems to me that none of the above path matches the JAVA_HOME set up in bashrc file. Can you let me know why? I am pretty confusing about how to setting up JAVA_HOME and JAVA_PATH
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

The environment variable JAVA_HOME has no special meaning to Java. Some Java applications such as Tomcat use it but Java in general does not. If your JAVA_HOME points to a non-existent directory then it can probably be safely removed.


Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
cake naiyou wrote:



Sorry I have few experience in setting Java @ Unix server. Might not be true but it seems like whereis also prints the soft links pointing to real installation of java. Usually the /usr/bin/java where the one we used in the past to compile.

Others should help you!
john
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

On Unix-like operating systems, you can have symbolic links. For example, /usr/bin/java might be a link to a file in a completely different directory (maybe somewhere in the directory /usr/lib/jvm/java-1.6.0-sun.x86.64). You can't see that just by looking at the name /usr/bin/java alone.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
wood burning stoves
 
subject: how to setup JAVA_HOME and JAVA_PATH
 
Similar Threads
Forte 3.0 for Linux PointBase question
classnotfound Java->mysql jdbc problem!
Eclipse on Debian Sarge
ClassNotFoundException
How to install tomcat5 in Ubuntu 11.04 when it is not in the apt-cache?