Captain's Universe Home
Captain's Universe Home
Cosmic Ray Muon DetectorTeleGarden Pages
Time on MarsBryophyllum Plants
Jupiter Radio AstronomyAncient Pages
Salzburg Tourist GuideEarth Magnetometer
  H O M E     AJAX & MORE     LINUX & MORE     RTAI     XENOMAI     ADEOS IPIPE      
    JAVA & BROWSERS     *NIX     ELECTRONICS     REVIEWS     ARTEMIA     FAIRY SHRIMP      



Java Application Template GUI Tutorial Part 5/5 - How to make an executable JAR file

Now we're almost done. We just need a manifest file to tell the java interpreter where to find the actual starting class of the program.



file "manifest":
Manifest-Version: 1.2
Main-Class: Splash
Created-By: 1.4 (Sun Microsystems Inc.)
Compile the whole application with:

compile.sh
#!/bin/sh
javac Splash.java
javac Main.java

jar cvfm Splash.jar mymanifest Splash.class SplashWindow.class Main.class
        Main\$1.class Main\$2.class Main\$3.class Main\$4.class
        Main\$5.class App1.class splash.gif
compile.bat
javac Splash.java
javac Main.java

jar cvfm Splash.jar mymanifest Splash.class SplashWindow.class Main.class
        Main$1.class Main$2.class Main$3.class Main$4.class
        Main$5.class App1.class splash.gif
Run the application with:
java -jar Splash.jar
or just click on the icon of the java application.



TROUBLESHOOTING AND ERRORS see How to make a JAVA application - executable JAR archive

DOWNLOAD THE SOURCE CODE (~10k ZIP file)


PART 1 PART 2 PART 3 PART 4 PART 5


Last-Modified: Sat, 04 Feb 2006 16:03:09 GMT

Google
 
Web www.captain.at
go to top
© 1996-2010 . All rights reserved.
No reproduction, distribution, publishing or transmission of the copyrighted materials at this site is permitted. Policy
go to top