View all newsletters
Receive our newsletter - data, insights and analysis delivered to you
  1. What Is
June 20, 2016updated 16 Feb 2017 3:17pm

What is Java -cp?

Find out about the parameter used in Java.

By Ellie Burns

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?

Content from our partners
Why food manufacturers must pursue greater visibility and agility
How to define an empowered chief data officer
Financial management can be onerous for CFOs, but new tech is helping lighten the load

Topics in this article:
Websites in our network
Select and enter your corporate email address Tech Monitor's research, insight and analysis examines the frontiers of digital transformation to help tech leaders navigate the future. Our Changelog newsletter delivers our best work to your inbox every week.
  • CIO
  • CTO
  • CISO
  • CSO
  • CFO
  • CDO
  • CEO
  • Architect Founder
  • MD
  • Director
  • Manager
  • Other
Visit our privacy policy for more information about our services, how New Statesman Media Group may use, process and share your personal data, including information on your rights in respect of your personal data and how you can unsubscribe from future marketing communications. Our services are intended for corporate subscribers and you warrant that the email address submitted is your corporate email address.
THANK YOU