Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

How can I put my app with all libs in a singe-jar?

Thread view: 
Markus - 23 Nov 2005 14:55 GMT
I have written an hybrid applet (applet + application) which uses some
libs.

Is there a possibility to put the application (only classes and
properties) and the libs (jar-files) into a singe-jar without to
extract all data from the libs to the application?

kind regards

Markus
abrasivesponge@gmail.com - 23 Nov 2005 15:56 GMT
Seems like a lot of work, and not very flexible.  But I don't see why
you can't do it.
Markus - 23 Nov 2005 16:18 GMT
The Problem is that jars will not be found if they are inside an other
jar.

Markus
abrasivesponge@gmail.com - 23 Nov 2005 16:29 GMT
To be honest, I never thought that was a problem.
Markus - 24 Nov 2005 14:50 GMT
ProGuard seems to be a solution but is there no possibility to use the
classes from the jars inside the jar?

Markus
Roedy Green - 24 Nov 2005 17:34 GMT
>ProGuard seems to be a solution but is there no possibility to use the
>classes from the jars inside the jar?

not without a custom class loader.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

pkriens@gmail.com - 25 Nov 2005 12:36 GMT
On OSGi they are, we have the Bundle-Classpath that can point to JARs
inside JARs as well as directories.

Kind regards,
 Peter Kriens
Roedy Green - 23 Nov 2005 16:11 GMT
>Is there a possibility to put the application (only classes and
>properties) and the libs (jar-files) into a singe-jar without to
>extract all data from the libs to the application?

if you put the classes into one big jar and don't nest, i.e. put the
oher jars in directly, all should be ok.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Rogan Dawes - 23 Nov 2005 16:20 GMT
> I have written an hybrid applet (applet + application) which uses some
> libs.
[quoted text clipped - 6 lines]
>
> Markus

Take a look at ProGuard. It unpacks all your libraries, identifies the
classes actually used (optional), and packs them all up into a single jar.

Rogan
Matt Parker - 26 Nov 2005 14:55 GMT
> I have written an hybrid applet (applet + application) which uses some
> libs.
[quoted text clipped - 6 lines]
>
> Markus

Be careful about licensing. Some of the licenses in those jars might
prohibit the distribution of the classes outside of the original jars.

Matt


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.