File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes JAVA_HOME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JAVA_HOME" Watch "JAVA_HOME" New topic


rama murthy
Ranch Hand

Joined: Jan 13, 2006
Posts: 82
Why we need to set this variable? (I hope this is an environment variable just like path and classpath).
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15046

Yes, it is an environment variable just like PATH and CLASSPATH.

You don't need to set it to be able to use the JDK. See the JDK installation instructions - it doesn't say anything about JAVA_HOME.

Some programs (for example Ant and Tomcat) find the JDK by looking at the environment variable JAVA_HOME, so you might need to set it if you want to use those programs.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
rama murthy
Ranch Hand

Joined: Jan 13, 2006
Posts: 82
Thanks Jesper.

I got one more question. Do all these environment variables like path, classpath,java_home has to be set using capital letters. If so why?
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
Some operating systems are case sensitive, and in the past many would use capitals only.

Zakir Hossain
Ranch Hand

Joined: Feb 14, 2006
Posts: 38

u can go to
and get Java Creator as it is same like visual studio

"The Choices We Make, Dictates Our Life To Lead".
I agree. Here's the link:
subject: JAVA_HOME
It's not a secret anymore!