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 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.

XUL Tutorial

XUL Tutorial
One of the more interesting features of Mozilla applications is XUL, The XML User-interface Language, which is used to describe a Mozilla application’s user interface. I’ve heard the buzzwords “chrome” and “XUL” mentioned for awhile, so this tutorial seems as good a starting point as any for learning more about these things.

RoundCube Webmail Project

RoundCube Webmail Project
I’ve been looking with interest at AJAX (Asynchronous Javascript And XML) applications for sometime, the most impressive of which to me is GMail. This project is an effort at producing a similarly powerful webmail application using only Javascript and XML. It’s still pretty early, but it looks very nice so far, a nice project to work on for those interested in learning more about the intricacies of Internet mail protocols.

ReddiCast Episode 2 available for download

Hot on the heels of the debut, Episode 2 of the ReddiCast takes a look at a few Voice Over IP (VoIP) Applications.
Get ReddiCast Episode 2 here!
Subscribe to the RSS feed here!
Here are the shownotes:
Topic: VoIP Applications
Applications reviewed:
Background music:
Dan The Automator – Relaxation Spa Treatment
Thievery Corporation – Dc 3000
Ending Music:
Beastie Boys – Now Get Busy
All music is released under Creative Commons licensing and is part of the Wired CD on ccMixter

ReddiCast Episode 1 available for download

Now although I’ve already ventured into the world of podcasting through participation on the TTCS podcast, I’ve also wanted to be involved in the full process which includes editing, as well as speak about some topics that were a little outside the “local computing topics” realm of TTCS’s podcast.
So thus was born the ReddiCast. Episode 1 was recorded yesterday and edited today and is now available for download. Playing time is about 10 or 11 minutes. Filesize is about 5MB.
Get ReddiCast Episode 1 here!
Here are my shownotes:
Topic: Open Source File Sharing Applications
Applications reviewed:
Ares Galaxy
Notes: Background music downloaded from CCMixter
Under Creative Commons License
1st background song: Phoenix by Shockshadow
2nd background song: Bingo Bingo Babe by HPP/G3
There’s an RSS feed as well, for those who use iPodder or other podcasting RSS aggregateor. I’m not sure how well it works yet, since the whole “feeds” concept is still pretty new to me from the developer perspective, so please feel free to comment or e-mail me if there are any issues with the feed.

ccMixter – Download, Sample, Cut-up, Share

I’ve always been intrigued by the Creative Commons licensing, and the theory that by providing a less restrictive copyright licensing for intellectual property than is presently popular in many countries, the evolution of our world culture will flourish in ways never thought possible because of the sheer collaborative power of the Internet.
This site allows you to download samples under a “Creative Commons Sampling” license, and do what you want with the file, quite literally, in terms of chopping it up, remixing it, adding your own beat etc. This sites offers the worlds artists, both known and unknown, the opportunity to express creativity without restrictions imposed because of budget constraints.
We’ll see how this site develops over time…I look forward to someday hearing some steel pan beats or soca or chutney tunes remixed with some other culture’s indigenous music in some unforseen melodius way so that more of my native Trinidadian artists can have demonstrable proof of the power of Creative Commons licensing over traditionally hyped artist-restrictive licenses.