Re: Eclipse: building an (non-j2EE) app jar file.

From: P.Hill (goodhill_at_xmission.com)
Date: 12/17/03


Date: Wed, 17 Dec 2003 10:25:47 -0700

Jose Rubio wrote:
> The best approach is to keep them separate and include all of them in the
> classpath of the application.
> "P.Hill" <goodhill@xmission.com> wrote in message
>>What is the best way to instruct it to build a jar with all
>>of the .classes from various libraries (i.e. Junit, whatever
>>JDBC I using etc.)
[...]
>>
>>It seems kludgie to unzip all such jars into a resource directory, it

Just to clarify the details, I think you are saying that the best way to play
with Eclipse is to take any library I want to be in my non-j2EE application jar
and
(1) drop it from the list of libraries in the class path
(2) unsip the classes into some extra dir (maybe workspace/<project>/libclasses)
(3) identify this DIRECTORY as a source directory in the project (it will find
no sources, but it will move non-source out and into the bin dir when building)

This will result in a bigger and better set of classes in my bin and thus in the
final jar.

Are these the details of what you are suggesting?
-Paul



Relevant Pages

  • Re: Using mandatory libraries (custom class loading vs. expanding libraries)
    ... libraries via the Class-Path manifest entry. ... to include the libs on the Class-Path when launched via JAR. ...
    (comp.lang.java.programmer)
  • Re: Aside from googling....
    ... A program wants to import javax.jnlp but the package is part of another ... known jar libraries that contain such a class (and possibly allow to ... Shouldn't library requirements be in the documentation? ...
    (comp.lang.java.programmer)
  • Re: How to use libraries inside the exported jar
    ... including the jars with the following manifest file ... these libraries are inside the exported jar but if I launch it using ... insert also these libraries inside the same folder where I've the jar. ...
    (comp.lang.java.programmer)
  • Re: Deployment of Java Application
    ... >> I deploy an application that requires libraries that are not included ... >> it seems excessive to include the class files in my distributable jar ... I cannot just include the necessary jar ... >SchemaSpy's Main class uses the URLClassLoader technique. ...
    (comp.lang.java.programmer)
  • Re: security exceptions after jar repacking
    ... libraries as a bunch of files? ... separate jar files. ... Extracting them and adding ... under similar licenses, and all the licenses are packaged in the jar ...
    (comp.lang.java.programmer)