Solution to problem running SWT app from Jar

So I was writing a small application for a job I had and decided to through in a nice little interface using the SWT kit, since I wanted a little experience with this. The problem came about when I tried to create a JAR out of it, apparently there were a tonne of dependency issues with SWT that complicated the process of packaging the application. I did find some help though, which I’ll duplicate below along with the referencing URL, because in truth, this was the only walkthrough of many tried that worked for me. Enjoy!
Java Forums – problem running SWT app from Jar
To Create an Executable SWT JAR…

1. Make sure the SWT jar file is included in the Eclipse project build path
a. Download the standalone SWT jar file from eclipse.org even if you already have the ones that come with Eclipse. It is called “swt.jar” and you will package it with the executable JAR. Make sure it is the same version of SWT that you used to make your program.
b. In Eclipse, import swt.jar via Project Properties::Java Build Path::Libraries::Add External JARs. (Make sure to include the source .zip file). Also make sure to select the swt package in the “Order and Export” tab.
c. At this point, you should be able to compile and run your SWT application in the Eclipse SDK.

2. Do a standard Eclipse jar file export
a. Right click on the main .java project file and select “Export…”.
b. Choose “JAR File” from the list.
c. Select the relevant packages and .classpath and .project resource files
d. Make sure “Export generated class files and resources” is selected and browse to the location where you want the JAR file to be created.
e. Specify “Generate the manifest file” and don’t seal the JAR or any packages. Choose the class containing the main method as the “Main class”.

3. Change the manifest file
a. Navigate to the JAR file you created and open it with WinZip.
b. Open the MANIFEST.MF file inside and copy the contents.
c. Create a new file called “MANIFEST.MF” and paste in the contents of the old manifest file.
d. Add the line “Class-Path: ”. For simplicity, you can just keep a copy of the swt.jar file in the same folder as the executable jar, in which case, the line is “Class-Path: swt.jar”. Make sure there is a carriage return after the last line in the manifest file, or that line will not be parsed.

4. Replace the manifest file
a. Make sure the manifest file and the executable jar are in the same folder.
b. Open the command prompt and navigate to the containing folder.
c. Enter the command “jar umf MANIFEST.MF ” to update the manifest file with the class path information.

5. Package the JAR with SWT files
a. Put the updated executable JAR file, swt.jar, and the associate DLL in the same folder. The DLL can be pulled out of swt.jar and should have a name like “swt-win32-####.dll” on Windows.
b. The JAR file should now successfully execute. On Windows, you can usually just double click the JAR file in explorer and it will open. If that does not work, the command “java –jar ” on the command line has the same effect.