executable jars


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: executable jars

  1. #1
    goodnick Guest

    executable jars


    I've seen a few demo's were they have made executable jars. How can these
    be created?

    thanks for your time,

    goodnick


  2. #2
    Patrick Lacson Guest

    Re: executable jars

    You need to create a manifest file.

    A sample file would be like

    Manifest-Version: 1.0
    Created by: Your name
    Main-Class: myPath.to.your.Main
    Classpath:

    Save this file as MANIFEST.MF in a directory called META-INF. The
    Main-Class you define is your java class that has public static void
    main(String[] args) where the entire app will run from.

    Your directory structure will look like this

    /
    /myPath/to/your/Main
    /META-INF/MANIFEST.MF

    jar this up by typing

    jar cvfM myApp.jar myPath META-INF

    now to run the app type

    java -jar myApp.jar

    Hope this helps..
    -Patrick
    goodnick wrote:
    >
    > I've seen a few demo's were they have made executable jars. How can these
    > be created?
    >
    > thanks for your time,
    >
    > goodnick


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center