Solved

Java JAR files

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
splitOdd10 challenge 5 104
Cipher Configuration on Apache HTTPD 4 62
How to monitor the number of connections/threads being utilized on Tomcat 6.0 8 70
javap bin 2 34
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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 covers a step-by-step guide to install VisualVM launcher in eclipse.

806 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