Solved

Why do we need JAVA_HOME and CLASSPATH

Posted on 2009-05-05
3
322 Views
Last Modified: 2013-11-23
I just used PATH system variable and had the jdk1.5.0_18\bin  point to it apart from other folders. This way I was able to run my simple Java programs without any problem. I also learnt that Java installs the interpreter file java.exe in %SYSTEM_ROOT%/system32 folder.  I deleted that file java.exe but my simple one liner class continued to compile from anywhere using javac and run using java.

Why then do we need these two variables ,   JAVA_HOME and CLASSPATH?

Thanks
0
Comment
Question by:perfect_tranquility
3 Comments
 
LVL 92

Assisted Solution

by:objects
objects earned 150 total points
ID: 24310019
you don't really, certainly not for simply compiling and running java apps

0
 
LVL 17

Accepted Solution

by:
Thomas4019 earned 350 total points
ID: 24310877
JAVA_HOME refers to where the JDK is installed.
CLASSPATH refers to all the directories where to search for class files.
0
 

Author Comment

by:perfect_tranquility
ID: 24318869
Fantastic,   be on the look out geeks. My next question is soon to be up here on packages and classes and using classpath and compiling them.

Thanks!  Great answers


0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now