Tuesday, December 31, 2013

ClassPath

ClassPath : Classpath is a parameter, it search for the classes and other resource files in the Java Virtual Machine or the Java compiler where to look for user-defined
* ClassPath can be present at drive/folder/subfolder ..
* Java compiler or runtime environment won’t be able to find the classes unless they are somewhere in the class path
* Multiple entries in the class path are separated by a semicolon on Windows (;) and by a colon on UNIX (:)
* To limit the search to particular locations, Operating System Environment variable CLASSPATH is being used

we can set classpath in following ways:
1.command-line window or Shell --> Temporarily
2.Setting Permanently at the System level (ex. in .profile file) in unix
3. environment variable settings in windows -->Permanently
4.At runtime by specifying the class path each time you start your Java application and the JVM in Unix --> Temporarily
5.Setting the path in Manifest file

No comments:

Post a Comment