Results 1 to 3 of 3
  1. #1
    gotenks05 is offline Member
    Join Date
    Sep 2008
    Posts
    34
    Rep Power
    0

    Default creating executable jars from Swing programs

    I have created by third program today, which is a GUI program, and I'm not sure what I'm doing wrong. I got the class files created and the manifest file, but my program won't run from the jar file. When I created jar files of classes that did not have Guis, I just typed it "Main-Class: Salestax.class" into the manifest file since the manifest file was in the same folder as the class files and it worked. Is there something I'm doing wrong or need to add to the manifest? The four class files are the following: Salestax.class (Actual program), SwingWindow.class, SwingWindow$1.class, and SwingWindow$CalcButtonLitener.class (the things needed for the button to work. I am going to include a zip file containing those folder, in case you need to see what exactly is in the manifest file or try and make the jar and tell me how you got it to work.
    Attached Files Attached Files

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    Copy and paste the full text of the error message here along with the command you are using to execute it.

  3. #3
    gotenks05 is offline Member
    Join Date
    Sep 2008
    Posts
    34
    Rep Power
    0

    Default

    the command I mainly use, after using "cd" to get to the directory is "jar cmvf [manifest filename] [file.jar] *.class". I tried to replicate the problem, but it seems that the errors did not happen this time. Thanks for trying to help. Also, do you know how I can prevent something like this. I think the errors was some like main and then mention a bunch of thiings like dispatch and java.awt.something. Sorry I could not replicate it again. I'm not sure how it did not work one time and this time it did.

Similar Threads

  1. Replies: 0
    Last Post: 08-19-2008, 04:44 PM
  2. Creating popup menus with Swing
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 06-27-2008, 07:49 PM
  3. Preblem with JARs
    By bizmut in forum Eclipse
    Replies: 1
    Last Post: 06-04-2008, 05:41 PM
  4. Manifest file in executable jars
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-15-2007, 08:16 PM
  5. how to find unused jars??
    By orchid in forum Eclipse
    Replies: 4
    Last Post: 06-08-2007, 10:35 AM

Posting Permissions

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