aspose file tools*
The moose likes Beginning Java and the fly likes making jar files available to javac? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "making jar files available to javac?" Watch "making jar files available to javac?" New topic
Author

making jar files available to javac?

Frank Vandenberg
Greenhorn

Joined: Aug 05, 2002
Posts: 2
Sorry, this is probably just a dumb newbie question. I'm having a problem setting up a library jar file in a windows environment. I know that this is just an issue of setting up the PATH or CLASSPATH or something else correctly but I can't seem to get it right. Any hints, suggestions, nudges or outright handholding cheerfully welcomed.
Thanks,
Frank Vandenberg
Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

You can do one of 3 things:
1. Put the jar file in your system classpath, then it is available to everything all of time.
2. Type set classpath=%classpath%;C:\path\yourJar.jar from command line before running javac
3. Run javac like this:
javac -classpath C:\path\yourJar.jar yourJavaSource.java
Any of these will work. If you still have problems, give us some specifics. Hope this helps!
Barry
Frank Vandenberg
Greenhorn

Joined: Aug 05, 2002
Posts: 2
Thanks for the response, I'll try these suggestions.
Frank Vandenberg
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: making jar files available to javac?