2 Replies Latest reply: Mar 26, 2010 12:20 AM by 843804 RSS

    JAR files inquiry

    843804
      Hi all,

      i have created a JAR file for my program. And at the same time, I'm using 3rd part library. I'm having a bit confusion here.
      How do I run this JAR file or how to combine this JAR files into one JAR? I have read some post about this but I don't quite understand.
      any replies is much appreciated. Thanks a lot.

      Edited by: rose_joe on Mar 23, 2010 7:01 PM
        • 1. Re: JAR files inquiry
          800560
          You can put the 3rd party jar(s) in the same directory (or possibly a near-by directory) as your jar file and you include a Class-Path entry in your jar's manifest that provides the 3rd party jar name(s). This is the approach that seems to be what Sun/Oracle had in mind.

          Instead of using an executable jar, you can use a command line or batch file and include the 3rd party jar(s) in the Classpath.

          You can extract everything from the 3rd part jar(s) and re-jar into your jar. Bear in mind that you may violate a license agreement if you do this.

          There are tools that can read jars inside of jars. Google can help you find these. I am not familiar with any of them.
          • 2. Re: JAR files inquiry
            843804
            Thanks atmguy.