This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: making jar files available to javac?
 
Similar Threads
cannot access javax.servlet.http.HttpServletRequest HttpServletRequest.class not found
Struts2: No configuration found for the specified action
Classpath setting
Classpath Settings
Eclipse JARing