#19 Just extract lib-jars and pack them into the new jar

closed
PACK (3)
5
2007-09-29
2007-08-22
Anonymous
No

Hi,

to generate exectuable jars with foreign libs, I normally extract them and add the directly to the jar. So no special class loader is needed anymore.

It would be nice, if you could retrieve the required libs from e.g. the build-path extract the jars (removing or ignoring Meta-Inf and some other not required files, which may cause problems) and add the extracted class-file hierachy to the new jar.

E.G. log4j-1.2.14
Extracting leads to file tree like this:
log4j-1.2.14\org\apache\log4j

then I jsut have to add these class files to the jar.
(From a batch-file)
cd "log4j-1.2.14"
%jar% uvf %target% .

Normally widely used libaries don't cause name clashes.
The only problem I can think of would be that different libs relies on diffferent versions, but this should cause problems anyway, or?

Im not familar with eclipse plugin programming, otherwise I would do it this way.

Grettings Michael

Discussion

  • Ferenc Hechler

    Ferenc Hechler - 2007-09-29

    Logged In: YES
    user_id=876063
    Originator: NO

    Hello Michael,

    the Fat-Jar does exactly what you are describing. If you do not check the "One-Jar" option all class-files will be extracted from the different libs and will be added to one "fat" lib.

    Best regards,

    feri

     
  • Ferenc Hechler

    Ferenc Hechler - 2007-09-29
    • status: open --> closed
     
  • Nobody/Anonymous

    Logged In: NO

    Hi thanks,

    that was exactly, what I was looking for. I thought you were always using an non standard class-loader.

    Nice plugin. :-)

    By the way an option to recompile the source files before packing, with special options would be nice. E.g. to remove debug informations (-g:none).

    Greetings Michael

     
  • Nobody/Anonymous

    qk8bKM <a href="http://kpmnlihgkdns.com/">kpmnlihgkdns</a>, [url=http://pvmycxosbgwu.com/]pvmycxosbgwu[/url], [link=http://giyslakexlhw.com/]giyslakexlhw[/link], http://vyqkayftnjuh.com/

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks