This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

what is JAVA_HOME for?

 
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?
 
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.
 
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
 
"The Hood"
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.
 
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.
 
We can walk to school together. And we can both read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!