What is Java -cp?

what is java -cp

Java -cp is a parameter in the Java Virtual Machine or Java compiler.

The -cp, or CLASSPATH, is used as an option to the Java command. It is a parameter in the Java Virtual Machine or Java compiler that specifies the location of classes and packages which are defined by the user.

The CLASSPATH parameter can either be set via the command-line or through an environment variable.

The -cp parameter specifies a list of directories, JAR archives and ZIP archives to search for class files.


What is the difference between CLASSPATH and PATH?

Share Price:

USD ( ) ( Last Updated : )

Name of Technology:

Java -cp

Year Introduced:


Invented by :

Sun Microsystems

Open Source or Proprietary:


Main technology category:


Previous ArticleWhat is software?
Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *


  • Favorite list is empty.
FavoriteLoadingClear favorites

Your favorite posts saved to your browsers cookies. If you clear cookies also favorite posts will be deleted.