aspose file tools*
The moose likes Beginning Java and the fly likes classpath setting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "classpath setting" Watch "classpath setting" New topic

classpath setting

Amirtharaj Chinnaraj
Ranch Hand

Joined: Sep 28, 2006
Posts: 236
hi guys

i want to set group of jar files in classpath which is residing in differnt folder

i want to do this without using any IDE's

i want to know what are the possible ways to do this using my command prompt

looking for your replies
arulk pillai
Ranch Hand

Joined: May 31, 2007
Posts: 3219
type java -help in a command prompt and you should see -cp & -classpath to set the jars. these jars will be separate by ; in DOS and : in UNIX. If you are using Java 6+ you can just provide the folder names. Otherwise need to include individual jars.

c:\>java �cp c:/myProject
c:\>java -classpath c:/myProject/client.jar

Java Interview Questions and Answers Blog | profile | Java Interview Books
Amirtharaj Chinnaraj
Ranch Hand

Joined: Sep 28, 2006
Posts: 236
thanks arulk

for your reply

i want to know what java 6+ represents
I agree. Here's the link:
subject: classpath setting