This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 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 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
 
Similar Threads
How to run Java programs made in older versions
Setting up Java Problem
it is possible to do validations through Form class and Validations.xml file?
using javac and java (chapter 10 k&b)
packages doubt