Exercise 0: Installing necessary software
NOTE: JavaOne HOL attendees should skip this exercise because the appropriate development environemnt is already set up on the lab computers.
Goal:
Download and install the Sun SPOT software development kit and other required softwarefor creating, deploying and running both Sun SPOT and host applications. Sun SPOT applications run on the Sun SPOTs and are written using standard Java ME and the additional Sun SPOT-specifc APIs. Host applications are written using Java SE along with additional Sun SPOT-specific APIs and can interact with Sun SPOTs either over a USB connection or over the radio via a basestation.
For JavaOne attendees using the lab machines provided, the steps in Exercise 0 are done for you as part of the login process. So please proceed to Exercise 1.
- Load the Sun SPOT ManagerJava Webstart tool.
- If this is the first time you have run this tool, your system will be scanned to make sure you have all the required software installed.
- Once the Configuration check is complete, you will see a 'Success' screen and you can continue with the installation process
- Click 'OK' to continue to the installation screen
- Select the 'SDKs' Tab, and then select the 'v3.0 Purple' SDK from the 'Available SDKs' list.
- Click the 'Install' button, accept the license agreement, and choose an installation location
- Note: it is not advised to have a space in your path to the Sun SPOT SDK installation directory
- If all went well, you should now have an installed Sun SPOT SDK listed in your Sun SPOT Manager Tool.
- If this is the first time you have run this tool, your system will be scanned to make sure you have all the required software installed.
- Start the NetBeans 6.0.1 IDE and see if the IDE comes up.
- On Windows, Start >
Programs > NetBeans IDE > NetBeans IDE 6.0.1 > NetBeans IDE or
click NetBeans 6.0.1 desktop icon
- On Solaris, UNIX, or Linux, open a terminal window, then type <netbeans601_HOME>/bin/netbeans
- On Mac OS X start Applications-->NetBeans 6.0.1.app
- On Windows, Start >
Programs > NetBeans IDE > NetBeans IDE 6.0.1 > NetBeans IDE or
click NetBeans 6.0.1 desktop icon
- Make sure the NetBeans Sun SPOT Modules are installed
- Download the NetBeans Sun SPOT Update Center .nbm
- Select "Tools-->Plugins" and click the 'Downloaded' Tab, and the 'Add Plugins...' button. Find where your browser downloaded the com-sun-sunspot-updatecenter.nbm file and select it.
Note: Some browsers may rename the file after downloading with a '.zip' or other suffix. Rename the file to end in '.nbm' in order to be able to select it. - Select the SunSPOTsModuleUpdateCenter and click 'Install'
- You can accept all the default values in the subsequent screens
- Click on the 'Available Plugins' tab, and click the 'Reload Catalog' button, then click the 'Name' column to sort the modules by their names.
- Select all the Sun SPOT Modules
- SpotRenameRefactoring
- SunSpotApplicationTemplate
- SunSpotHostApplicationTemplate
- Sun SPOTs Info
- When the modules are properly installed you will see the Sun SPOT Info Module Button in your toolbar:
- Make sure that your Sun SPOTs are running the same version of the software, and upgrade if necessary.
- This lab is based on the v3.0 (Purple) version of the Sun SPOT SDK, which you should have installed in step 1 above.
- Make sure your Sun SPOTs are plugged in, and click on the Sun SPOTs tab.
- Select any Sun SPOT, and click the 'SPOT Info' button. If you see the following, you will need to update the software on your Sun SPOTs:
-run-spotclient-once: [java] SPOT Client starting... [java] [waiting for reset] Exiting - detected bootloader command [java] [waiting for reset] [java] [waiting for reset] [java] [waiting for reset] ** VM stopped: exit code = 0 ** [java] [waiting for reset] [java] WARNING: SPOT does not have current SDK installed. Please upgrade it [java] [java] Sun SPOT bootloader (blue-080318) [java] SPOT serial number = 0014.4F01.0000.059E [java] [java] Error: SPOT does not have current SDK installed. Please upgrade it [java] [java] The SPOT client will now exit [java] Experimental: JNI_OnLoad called. ****************************** SPOT Command Completed! ******************************
- Select 'All Sun SPOTs' from the pull-down menu, and click 'Upgrade'. You may need to reset each SPOT in turn during the upgrade process, so watch the output window for instructions.