This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all! Don't know if I really put that in the right forum, but I hope you will help me anyway... I have written a Java application, now I want to pack that application into one jar file so that one is able to execute the jar file and run the application but also that one is able to unzip the jar file and gets the source code (within the same directory structure I used while developing). I tried out different solutions, and I was -of course- able just to zip the whole project directory into an jar file, but that doesn't allow to execute the application. Then I made a self executable jar file (btw using ant) which was "working" as well except that the some thirdparty libs could not be found (but I put them into the jar as well and also in the classpath entry in the manifest). Does anyone know a good solution for this problem or a good site which explains this issue in detail? (well I was searching for ages now, but if there's a secret place... ) Thanks ind advance and best regards Gino
Use utility "jar" to create the jar file from directory tree with class files. You need save only class files, not source java files. [ March 09, 2004: Message edited by: Igor Ko ]
Joined: Mar 09, 2004
Ok thanks! I found now another acceptable way to provide the sources and the class files in one... Rgds
Joined: Jun 24, 2002
You should see description of jar utility: if you wish create EXECUTABLE jar, you have build some special 'manifest' of the jar... (because jar can contains a lot of classes with main function, what main should use JVM ? According jar manifest)