This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes java -cp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java -cp" Watch "java -cp" New topic
Author

java -cp

Abder-Rahman Ali
Ranch Hand

Joined: May 22, 2008
Posts: 138
Hello,

What does "-cp" mean in ---> java -cp abc.jar?

Thanks.
M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 160
-cp means classpath for zip/jar files

java -cp abc.jar?


will look in abc.jar (of course your command is incomplete, you have to provide one more ARGUMENT i.e. an executable class name)


R6i
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

It lets you set the classpath to use for searching for class files. you can also type in java -? to get help on what options are available and what they mean.


Steve
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10745
    
    9

A little bit more information than the command line can be found here


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: java -cp
 
It's not a secret anymore!