File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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.
 
Consider Paul's rocket mass heater.
 
subject: Where to put new jar-files to import from into other classes?
 
Similar Threads
import attribute and directory
Entity Bean and Servlet !
How to create a package and use it with JSP's
deploying an application on Tomcat 5.5.17
Why can I not Class.forName in doPost