Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Why do we need JAVA_HOME and CLASSPATH

Posted on 2009-05-05
3
Medium Priority
?
329 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 600 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 1400 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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

722 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