Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Java JAR files

  • 11-02-2004 01:23AM
    #1
    Closed Accounts Posts: 364 ✭✭


    Does anyone here know how to create a JAR file in Java.

    I have a Swing Application with 2 classes and I want ot be able to run it by clicking on it once. I tried the command jar -cvf Application.jar Class1.class Class2.class

    This didnt work though, there was an error message. I have looked on the web and there hasnt been a single simple explanation out there. Any help appreciated, thanks.

    Matt


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    http://www.freejavahelp.com/forums/TechSupport/messages/10401.shtml

    Normally use ANT though to create my jar files.


  • Closed Accounts Posts: 1,322 ✭✭✭phobos


    But doesn't ANT just use the Jar utility at the end of the day. Before that you'd have to write your xml build scripts. I use ANT also, but it's best to learn how to use a tool in isolation before linking it in with others for the sake of automation.

    Sun's tutorial on how to use the Jar utility is here

    HTH ;)

    ;-phobos-)


Advertisement