Solved

Why do we need JAVA_HOME and CLASSPATH

Posted on 2009-05-05
3
326 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

710 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