0

I'm at my wits end. I can't create a jar file (manually or through Eclipse). I've followed instructions for creating the manifest and jar file manually. The end result is that I get an error saying "The JavaJAR file 'widgetSamples.jar' could not be launched. Please check the console for possible errors." The console doesn't register anything when I launch the jar file or when the error message pops.

In eclipse when I create the jar I do get warnings:

Exported with compile warnings: SWT Resources/src/widgetSamples.java

I created a separate simple program to see if it might have been something with my code but I can't even get a simple SWT display to open; I get the same error. The code executes properly in Eclipse.

I have the 64 bit SWT installed as far as I know. Any help is much appreciated. Thanks.

dbconfession
  • 1,147
  • 2
  • 23
  • 36
  • 1
    Please focus on one particular way you tried to create the jar file, and explain the steps you tried. Also, what does your MANIFEST.MF look like? This file should have a line that says: `Main-Class:` and then the name of the class you want to be run when you run the jar file. – Erwin Bolwidt Mar 08 '14 at 01:59
  • Please post your manifest file here. Looks like you don't have main class setup correctly – dimoniy Mar 08 '14 at 02:26
  • @dimoniy join this convo. All the manifest info is in my original post http://stackoverflow.com/questions/22211381/java-exporting-as-jar-has-errors/22212433?noredirect=1#comment33818082_22212433 – dbconfession Mar 08 '14 at 03:26

1 Answers1

0

Creating jar file using eclipse IDE

http://www.tutorialspoint.com/eclipse/eclipse_create_jar_files.htm

Creating jar using CMD

http://www.wikihow.com/Create-JAR-File

Sunil Singh Bora
  • 771
  • 9
  • 24