Solved

Why do we need JAVA_HOME and CLASSPATH

Posted on 2009-05-05
3
323 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Application launch issue with Apache Tomcat 5 18
base64 decode encode 12 119
Basic Java Case or If-Else statement... 3 43
Apps blocked by Java 9 55
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

930 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

9 Experts available now in Live!

Get 1:1 Help Now