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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "classpath setting" Watch "classpath setting" New topic
Author

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
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3223
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 com.xyz.client.Pet
OR
c:\>java -classpath c:/myProject/client.jar com.xyz.client.Pet


Java Interview Questions and Answers Blog | Amazon.com 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: http://aspose.com/file-tools
 
subject: classpath setting