Classpath in Java
Classpath in Java
Classpath in Java
Classpath is a parameter used by the Java compiler (javac) and Java Virtual Machine (JVM) to
locate classes and packages used in a program.
Setting Classpath:
3. Using IDE:
Classpath is configurable in most IDEs via project settings.
Example:
If you have:
- MyApp.java in C:\JavaProjects
- utils.jar in C:\libs
Default Classpath:
- If not set, default is the current directory ('.')