Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

making jar files available to javac?

 
Frank Vandenberg
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 523
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response, I'll try these suggestions.
Frank Vandenberg
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic