When you install the SunSPOT software you will notice that there is a SPOTManager.jnlp (web start) file. You can use this file to run the SunSPOT manager but it will most likely fail (it failed with me). There are three ways you can run it.
The easiest is to just run it from SunSPOT’s web site.
The second is to get all the needed jar files in your file system and change the SPOTManager.jnlp file by hand to point to the location of these files. The jar files you need are
- SPOTManager.jar
- swing-layout-1.0.3.jar
- activation.jar
- mail.jar
- PDFRenderer.jar
You can get these files from their corresponding web sites, or for convenience download them from http://www.sunspotworld.com/SPOTManager/dist/. You will need to append the file name of each jar at the end of the url: http://www.sunspotworld.com/SPOTManager/dist/SPOTManager.jar and so on.
Once you have downloaded all of them change the SPOTManager.jnlp file to look something like that
<?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" codebase="file:///Users/panos/Java/SunSPOT/" href="SPOTManager.jnlp"> <information> <title>SPOTManager</title> <vendor>Sun Labs</vendor> <description>SPOTManager</description> <description kind="short">SPOTManager</description> <homepage href="http://www.sunspotworld.com/"/> <icon href="SpotDownload.png" kind="default"/> <icon href="SpotSplash.png" kind="splash"/> </information> <resources> <j2se version="1.5+"/> <jar href="webstart/SPOTManager.jar" main="true" download="eager"/> <jar href="webstart/swing-layout-1.0.3.jar" download="eager"/> <jar href="webstart/activation.jar" download="eager"/> <jar href="webstart/mail.jar" download="eager"/> <jar href="webstart/PDFRenderer.jar" download="eager"/> </resources> <security> <all-permissions/> </security> <application-desc main-class="sunspot.spotmanager.Main"> </application-desc> </jnlp>
Note that I have changed the codebase to point to a file on the local file system instead of the web. And also the jar file is referenced relevant to where the SPOTManager.jnlp file is. If SPOTManager.jnlp is in folder x then the mail.jar should be in x/webstart/mail.jar.
Also, it’s very important to sign the jars from the beginning again. And sign them all with the same signature. You can create your own certificate to do that.
If you have followed all the steps correctly you should be able to run the SunSPOT manager.
The third solution is similar to the first one. Instead of having the files served directly from the file system you can upload them to the local apache server (to start the apache System Preferences – Sharing – Personal Web Sharing. This should start the apache) and have apache serve them for you. Then doubl click again the SPOTManager.jnlp and the manager should start.
16 May 2008 at 12:02 am |
All of these steps will work, but I’m not sure what they actually buy you, other than SPOTManager will never properly update itself. Running from the website-provided jnlp will allow you to create a desktop (or any other place) application which will run either connected or disconnected, and will check for updates when connected.
16 May 2008 at 8:14 am |
Nice one David, thanks for the info. I wasn’t sure how it works, I thought the manager could update regardless where you originally ran it from.