What is the difference between Class Path and Build Path

The build path is used for building your application. It contains all of your source files and all Java libraries that are required to compile the application.

The classpath is used for executing the application. This includes all java classes and libraries that are needed to run the java application. A Classpath is mandatory, the default path is . which is used if the java virtual machine can’t find a user defined path. (CLASSPATH environment variable, -cp flag or Class-Path: attribute in a jar manifest)

Leave a Comment