Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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 The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java import statement" Watch "java import statement" New topic
Author

java import statement

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
hi
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 ?

cheers
chris


One day all greenhorns will run free ...
Anonymous
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
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: java import statement