Solved

Java JAR files

Posted on 2003-10-21
5
322 Views
Last Modified: 2013-11-23
I have an application that I would like to distribute as a single executable JAR. I want to include other needed JAR files within the executable JAR file. Will this work? What would the Manifest file look like (specifically the classpath)?
0
Comment
Question by:mlindeboom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 125 total points
ID: 9590642
If you want to include the other jar files INSIDE your jar file, you have to extract them out, then add the classes back into your jar file

the classpath in this case would be empty...
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9590644
otherwise, you will have to distribute your jar and the other jars, and the classpath in your jar will poit to the other jars
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9590657
It should be noted that unpacking third party jar files, and wrapping them up in your own application MAY void the licence for the third party jar

You need to study the licence closely...

I *think* that this would void the GPL, but NOT the LGPL

(as the GPL pretty much forces you to distribute the source and libraries as they are (and also distribute the source of your app)

Tim.
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 9590905
What IDE you are using?

If you are using JBuilder, you can build a jar as you expect using the Archive Builder, believe this will not violate the GPL :)

Regards,
Siva
0
 
LVL 1

Expert Comment

by:TrueIdiot
ID: 9594179
I dunno if this'll help, but I found a website that gave me a lot of info on building executable jars. Try looking at http://csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html 
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question