File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes java import statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java import statement" Watch "java import statement" New topic

java import statement

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
theres somehting i just want to confirm when i write a class that uses teh import command at the top

where do i put any relevant import jar files ? is it always in the webapps/WEB-INF/lib directory of the application server ?


One day all greenhorns will run free ...
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
you can put your jar files everywhere in the class path. If you are developing web apps there are two possibilities. WEB-INF/lib of your application or /lib of your server.
Preferred way is to put it in the application lib dir, cause then if you redeploy on a different server you have everything you need.
For normal java applications the jars can be everywhere but you have to include them in your startup file or your command java -classpath $PATH/your.jar
Hope that helps
I agree. Here's the link:
subject: java import statement
It's not a secret anymore!