Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2010, 02:01 PM
Member
 
Join Date: Jan 2010
Posts: 14
Rep Power: 0
rummy is on a distinguished road
Default Where to place jar files
Hello everybody,
I have been trying to run a stand alone java application from commannd prompt. But it reports error since certain jars which are required by the program were not resolved by the compiler.So, kindly let me know where exactly the jar files should be placed.
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 02-09-2010, 02:08 PM
Senior Member
 
Join Date: Jun 2008
Posts: 1,390
Rep Power: 3
masijade is on a distinguished road
Default
Anywhere you want to, so long as they are referenced on the classpath.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 02-09-2010, 02:10 PM
Senior Member
 
Join Date: Sep 2008
Location: Voorschoten, the Netherlands
Posts: 1,208
Rep Power: 3
JosAH is on a distinguished road
Default
Originally Posted by rummy View Post
Hello everybody,
I have been trying to run a stand alone java application from commannd prompt. But it reports error since certain jars which are required by the program were not resolved by the compiler.So, kindly let me know where exactly the jar files should be placed.
You can store them anywhere you want as long as you mention them (with a full path name) in your classpath list. There is one exception: if you store them in your lib/ext sub directory of your JRE installation directory you don't have to metion them any further, i.e. that directory is checked for .jar files and .class files when it starts up (but better not to store anything there without exactly knowing what you're doing).

kind regards,

Jos

Last edited by JosAH; 02-09-2010 at 02:10 PM. Reason: too slow again ...
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 02-11-2010, 02:08 AM
Steve11235's Avatar
Senior Member
 
Join Date: Dec 2008
Posts: 969
Rep Power: 2
Steve11235 is on a distinguished road
Default
A lot of people create a "lib" folder off the project root folder and put their JAR files in there. It's just a convention, but it's a good idea. You have to list each JAR file on the classpath. If you are working from the command line, I suggest using batch files so you don't have to retype everything over and over. Also, an IDE such as NetBeans or Eclipse will save you a lot of work.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract jar and place in other folder kkk Advanced Java 4 08-31-2009 10:42 AM
How do I place these numbers into an array mainy New To Java 2 07-19-2009 07:57 PM
How To Place Three Files In A Folder ramesh.8189 AWT / Swing 4 02-12-2009 08:59 AM
how to place the controls > makpandian AWT / Swing 1 12-18-2008 07:17 AM
How can i copy a folder from one place to another.. rajeshgubba New To Java 4 06-14-2008 03:21 AM


All times are GMT +2. The time now is 08:43 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org