DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: executable jars

Hybrid View

  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


Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links