Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Java JAR files

Options
  • 11-02-2004 1: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 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