aspose file tools*
The moose likes Beginning Java and the fly likes what is JAVA_HOME for? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is JAVA_HOME for?" Watch "what is JAVA_HOME for?" New topic
Author

what is JAVA_HOME for?

Lubosh Bazant
Greenhorn

Joined: Jan 15, 2002
Posts: 14
What exactly is the purpose of setting up the JAVA_HOME parameter in the OS environment. How is it different from classpath and path parameters?
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
if im not mistaken the JAVA_HOME is for tomcat web server.
not related to pure java.
John Lee
Ranch Hand

Joined: Aug 05, 2001
Posts: 2545
Originally posted by Roy Ben Ami:
if im not mistaken the JAVA_HOME is for tomcat web server.
not related to pure java.

JAVA_HOME is the directory you install your jdk.
i.e.
JAVA_HOME = c:\jdk1.3.1_01
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
If you set a JAVA_HOME parameter, then you can set all your other stuff like classpaths etc in reference to the JAVA_HOME parameter:
set path=%JAVA_HOME%\bin;%path%
set classpath= .;%JAVA_HOME%\lib;
Now you can just switch around your JAVA_HOME parameter and all the related parameters get automatically updated.

The down side of the JAVA_HOME parameter, is that you can forget that you have it set, say in your autoexec.bat, and then you go and tinker around with your classpath, and pick up stuff from the JAVA_HOME directories, causing suprising results - so beware.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Sals Hamid
Greenhorn

Joined: Jan 04, 2002
Posts: 24
yes you r right JAVA_HOME for Tomcat web server.
It is using to tell web server in which directory our jdk file reside.
No need to mention if u r not using web server.


No Path of Flowers lead to glory
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is JAVA_HOME for?