Re: create a jar file with an external jar library



Sigmund Hansen wrote:
Luigi wrote:
Hi,
in my application there are several import from an external library, in Eclipse i've added this library in Project -> Properties -> Java Build Path -> Add External JARs.

Well, when i export as a Jar file this "jade.jar" library is not in my jar file and the application cannot run.

I've tried even to manually modify the manifest.mf file adding the row: Class-Path: jade.jar (adding even the file in the jar)... but this is not a solution

Is there a solution?


I don't use eclipse, but the Class-Path does it just say jade.jar, or does it contain the path of the jade.jar?
Or else, then your jar and the jade.jar need to be located in the same directory.

The jade.jar should not be inside your jar file, if you want to put the library in your jar file, you need to extract the files in jade.jar and put them in your own jar file.

Are you sure the problem is the external library though?
and what about dtd files for xml in jar files? i can make my jar works only when dtd directory in the same dir. But if i want to locate my dtd dir in jar?
.



Relevant Pages

  • XML, DTD validating
    ... I've some problem with the DOM parser. ... validating by a specific DTD but what happens when I put this DTD in a ... The DTD cannot be found by my xml file. ... that DTD was taking in my JAR file? ...
    (comp.lang.java)
  • Re: How to update a jar file for one source file change?
    ... I'm new to java, so, I may get terminilogy wrong, bear with me. ... we've got a BIG jar file that includes thousands of classes. ... updated java source code was not being used. ...
    (comp.lang.java.programmer)
  • Re: Jar executable files open in Winzip or save as zip not jar
    ... The file Associations in Windows are fine. ... Windows, it runs with the java runtime application, and the application runs ... Go to Windows Explorer and navigate to any .jar file (perhaps in ... See it that will reset the file association for the jar files. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Running java programs from class files
    ... java -classpath /xyz/abc MyPackage.MyClass ... I think the most confusing part is the root business. ... I can get it to work if I put the jar file in the Class-Path: line in the manifest and put the jar file in the same directory as the program jar file but not from the command line. ...
    (comp.lang.java.programmer)
  • Re: Jar executable files open in Winzip or save as zip not jar
    ... The file Associations in Windows are fine. ... Windows, it runs with the java runtime application, and the application runs ... See it that will reset the file association for the jar files. ... it as a jar file. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)