• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classpath setting

 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks arulk

for your reply

i want to know what java 6+ represents
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic