Results 1 to 5 of 5

Thread: [RESOLVED] How to package a JSwing app?

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2007
    Location
    England
    Posts
    61

    Resolved [RESOLVED] How to package a JSwing app?

    Hey,

    I am used to writing Java programs which run on a command line.

    I normally make a jar file and run this command in unix:

    java -jar myapp.jar

    to run the file...

    I have wrote a Java Swing app for the first time and am wondering how I package this up for users to be able to run it?

    jar files don't seem to do it.

    Any ideas?

    Thanks for the help!
    Last edited by DonCash; Aug 17th, 2007 at 02:42 AM.

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: How to package a JSwing app?

    JAR files are executables, users only need the JRE to run them
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2007
    Location
    England
    Posts
    61

    Re: How to package a JSwing app?

    Yeah,

    So can a Swing application be packaged into a Jar and run in the same way?

    I've tried this already but doesn't seem to work.

    How else can a Swing app be executed?

  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: How to package a JSwing app?

    So can a Swing application be packaged into a Jar and run in the same way?
    Yes, you just need to use the command line correctly.

    Example 1: to archive two class files into an archive called classes.jar:
    jar cvf classes.jar Foo.class Bar.class
    Example 2: use an existing manifest file 'mymanifest' and archive all the
    files in the foo/ directory into 'classes.jar':
    jar cvfm classes.jar mymanifest -C foo/ .
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2007
    Location
    England
    Posts
    61

    Re: How to package a JSwing app?

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width