Solved

Java JAR files

Posted on 2003-10-21
5
321 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

Industry Leaders: 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

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

730 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