Hi all,
Can someone tell me what's the difference b/w Path & Classpath?
Thanks for any reply......
Path Vs. Class Path
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jul 20, 2011, 10:20 PM EDT
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 BantheswaranRank #170 · 14.1K reputationPosted Jul 28, 2011, 8:49 PM EDT