Solved

Java JAR files

Posted on 2003-10-21
5
316 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
  • 3
5 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 125 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now