This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is JAVA_HOME for?

 
Lubosh Bazant
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if im not mistaken the JAVA_HOME is for tomcat web server.
not related to pure java.
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sals Hamid
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic