JOGL Java Webstart (JNPL)

Turning a JOGL application into a Java webstart application was relatively easy and just involves building a JAR file and creating a JNLP (Java Net Launch Protocol) file. After doing this once I bet you'll probably end up always using webstart to distribute you applications. It is just so easy to work with and installing applications on any browser with Java installed is a snap.

However, I did have a problem when trying to start the application from the browser for the first time. Webstart kept giving me an error message “Java Web Start – Unexpected Error - Unable to launch simpleblending”. When I asked for details, I got the following information (not the most helpful message).

An error occurred while launching/running 
the application.

Title: simpleblending
Vendor: Peter Finch
Category: Unexpected Error

Unexpected exception: java.lang.Exception

I tracked it down to the location I was getting the JOGL extension from. I originally used the prescribed location of https://jogl.dev.java.net/webstart/jogl-1-1.jnlp, however, when I changed this to http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp the problem disappeared and the application started. Perhaps this is a library version problem or something. I understand it is possible to have your own copies of the libraries, which is probably a good idea so that you always know what version or JOGL your application running against. I'll work that out later...

Below is the JNPL file I used and here is a link to the webstart application. Just create a JAR file as you normally would. I like to use Ant scripts to automate the building and deployment for this sort of thing, as it is really easy and built into Eclipse. Note that the first time you load this it will go off and download the JOGL jar and native libraries for your platform. This could take a while (it's about 1.5MB's of data), but the great thing is that once it is downloaded, if any of you other applications use the same location they will reuse the already downloaded version and start up a lot quicking. JNPL even handles version changes (it's so cool!)

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://www.homepla.net/webstart/simpleblending" href="simpleblending.jnlp">
<information>
<title>Simple Blending</title>
<vendor>Peter Finch</vendor>
<homepage href="http://www.homepla.net/webstart/simpleblending/" />
<description>JOGL Webstart Example 1</description>
<offline-allowed/>
</information>
<resources>
<j2se version="1.4+" />
<jar href="jplanet.jar" />
<property name="sun.java2d.noddraw" value="true"/>
<extension name="jogl" href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp" />
</resources>
<application-desc main-class="jplanet.JPlanetWindow" />
</jnlp>

Labels

Web Search Gmail Google Docs Mobile YouTube Google Maps Google Chrome User interface Tips iGoogle Social Google Reader Traffic Making Devices cpp programming Ads Image Search Google Calendar tips dan trik Google Video Google Translate web programming Picasa Web Albums Blogger Google News Google Earth Yahoo Android Google Talk Google Plus Greasemonkey Security software download info Firefox extensions Google Toolbar Software OneBox Google Apps Google Suggest SEO Traffic tips Book Search API Acquisitions InOut Visualization Web Design Method for Getting Ultimate Traffic Webmasters Google Desktop How to Blogging Music Nostalgia orkut Google Chrome OS Google Contacts Google Notebook SQL programming Google Local Make Money Windows Live GDrive Google Gears April Fools Day Google Analytics Google Co-op visual basic Knowledge java programming Google Checkout Google Instant Google Bookmarks Google Phone Google Trends Web History mp3 download Easter Egg Google Profiles Blog Search Google Buzz Google Services Site Map for Ur Site game download games trick Google Pack Spam cerita hidup Picasa Product's Marketing Universal Search FeedBurner Google Groups Month in review Twitter Traffic AJAX Search Google Dictionary Google Sites Google Update Page Creator Game Google Finance Google Goggles Google Music file download Annoyances Froogle Google Base Google Latitude Google Voice Google Wave Google Health Google Scholar PlusBox SearchMash teknologi unik video download windows Facebook Traffic Social Media Marketing Yahoo Pipes Google Play Google Promos Google TV SketchUp WEB Domain WWW World Wide Service chord Improve Adsence Earning jurnalistik sistem operasi AdWords Traffic App Designing Tips and Tricks WEB Hosting linux How to Get Hosting Linux Kernel WEB Errors Writing Content award business communication ubuntu unik