Solved

Java JAR files

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java and GPO 11 68
stackato and cloud 4 68
servlet example issue 6 29
MySQL  on Tomcat 8 24
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…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

911 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

22 Experts available now in Live!

Get 1:1 Help Now