Results 1 to 4 of 4
  1. #1
    rummy is offline Member
    Join Date
    Jan 2010
    Posts
    21
    Rep Power
    0

    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.

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Anywhere you want to, so long as they are referenced on the classpath.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,447
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote 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 01:10 PM. Reason: too slow again ...

  4. #4
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    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.

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •