Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jar files in Jar files?

Status
Not open for further replies.

mes123

Programmer
Jul 29, 2005
62
0
0
GB
I've just about finished coding my application and want to deploy it in a JAR file.

The app using the javamail API which is supplied in a JAR file of it's own. At the moment I'm running my app from within the NetBeans IDE and I have the javaMail and Validation class JAR's mounted in the project.

I can put their locations in the PATH variable for this machine but obviously if I want to deploy my app to other machines I'd rather not have to start updating env variables every time.

Is it possible to include these other JAR files in my main JAR file so that I only have one to distribute?
 
Rather, you'd include the other jar separately and link to it in the classpath when you run your application.

I'm sure that using the classpath has been covered more than adequately many times in this forum. Try a search if you're unsure how to do this.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Thanks Tim, found an entry and updating the Manifest solved the problem.

Code:
Manifest-Version: 1.0
Class-Path: javamail/mail.jar jaf/jaf-1.0.2/activation.jar 
Created-By: NetBeans IDE
Specified-By: JT.jarContent
Main-Class: mPOS.mpos

No to do some stress testing :)
 
Cool ;)

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top