wood burning stoves*
The moose likes Beginning Java and the fly likes Where to put new jar-files to import from into other classes? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Where to put new jar-files to import from into other classes?" Watch "Where to put new jar-files to import from into other classes?" New topic
Author

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

Thomas Hakkaart
Greenhorn

Joined: Jun 04, 2004
Posts: 1
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

Joined: Apr 14, 2004
Posts: 10336

You can put them anywhere, so long as you include them in your classpath.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
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.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Where to put new jar-files to import from into other classes?