Hi all,
Can someone tell me what's the difference b/w Path & Classpath?
Thanks for any reply......
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaganathan BantheswaranPosted Jul 21, 2011, 2:20 AM
PATH is nothing but setting up an environment for operating system. Operating System will look in this PATH for executables and you can run the executables (javac.exe, java.exe, javadoc.exe, and so on) from any directory without having to type the full path of the command.
Classpath is nothing but setting up the environment for Java. Java will use to find compiled classes (i.e. .class files). this is one of the way to tell applications, including the JDK tools, where to look for user classes
For example,assume that Java is installed in C:\jdk1.5.0\ and your code is in C:\Sample\example.java, then your PATH and CLASSPATH should be set to:
PATH=C:\jdk1.5.0\bin;%PATH%
CLASSPATH=C:\Sample
Jaganathan BantheswaranPosted Jul 29, 2011, 12:49 AM