Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where to put new jar-files to import from into other classes?

 
Thomas Hakkaart
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making a graphical program in Java that saves its drawings away as SVG-files. For this I need to import some special classes that I downloaded already. But where should I put them to make them available for the "import" command? I constantly get this error:

"The import ... cannot be resolved"

Thanks for your help in advance,

Thomas
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can put them anywhere, so long as you include them in your classpath.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Thomas!

As suggested, classes to be imported must be locatable by the Java compiler through the CLASSPATH. For a description of the CLASSPATH, and instructions on setting it, take a look at our FAQ on setting the classpath.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, note that folks around here may at times be better able to nudge you in the right direction, if you include the code that caused the problem, as well as the error messages.

Good luck.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic