my dog learned polymorphism*
The moose likes Beginning Java and the fly likes diff between path & classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "diff between path & classpath" Watch "diff between path & classpath" New topic
Author

diff between path & classpath

balaji karth
Greenhorn

Joined: Jan 27, 2006
Posts: 8
hi to all
I want to know the difference between setting path and classpath
I use path for executing java files from a different folder but whats is the use of CLASSPATH then....pls give me a clear idea abt that ...many gave me different answers..
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
I had made a tutorial about path and classpath. I would recommend to go through it. You can fint it here


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
In short, PATH is used by the operating system to find executable files (.exe's in Windows) that it can run. CLASSPATH, on the other hand is specifically used by Java to find .class files that are needed when you run a Java program.

Layne


Java API Documentation
The Java Tutorial
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Setting the PATH variable allows you "to conveniently run the JDK executables (javac.exe, java.exe, javadoc.exe, etc.) from any directory without having to type the full path of the command." To set the PATH, see these installation instructions for 32-bit Windows. (For other operating systems, click here.)

Setting the CLASSPATH variable "tells JDK tools and applications where to find third-party and user-defined classes." To set the CLASSPATH, see these JavaRanch instructions or Sun instructions.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
balaji karth
Greenhorn

Joined: Jan 27, 2006
Posts: 8
thank you
now i have got a clear idea abt that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: diff between path & classpath
 
Similar Threads
classpath and path
what is the different between PATH and CLASSPATH ?
Environment variables
JDate not found in JDateTest
path and classpath