class path

The list of folders and JAR files the JVM and the compiler search to find classes.

In more detail

When code refers to a class, the JVM looks for it along the class path. Build tools compute it from your dependencies: a test-scoped dependency is on the class path while tests run and absent from what ships. Spring Boot also inspects the class path to decide which auto-configuration applies.

Example

java -cp target/classes com.example.App

Related terms

Taught in

References

Certification courses