• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what is JAVA_HOME for?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic