Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. On-device debugging of Java ME MIDlets using Eclipse and NetBeansIDESettings on the phoneGo to Menu on the phone. Select Settings  Connectivity  Bluetooth. Give a name to the phone (as shownbelow) and turn Bluetooth On:Copy EcmtAgent.sis from the directory SymbianToolsEcmt directory located under the root folder of your NokiaSymbian^3 SDK to your phone and install it (either to C: drive or external memory). This will result in theapplications EcmtAgent and DebugAgent being available under Menu  Applications on the phone. Start theEcmtAgent by clicking on it. (The EcmtAgent application starts the Debug Agent when it is required to handle theMIDlet life-cycle).The EcmtAgent displays information on the screen. Check whether “Listening on Bluetooth” is shown in this screenas shown in the below figure.
  2. 2. If not, select Options  Settings. Select Bluetooth as bearer as shown below. Keep the EcmtAgent running on thedevice.
  3. 3. Settings on the PCMake sure that you use a BT device that uses the Microsoft BT stack. List of Bluetooth transceivers that aresupported in the Microsoft Windows XP SP2 is available at: Turn theBT transceiver on your PC “on”.In order to debug Java applications from the IDE on the Nokia phone, you need to use the Device Connectivity Toolto link the PC running the Eclipse IDE to the phone. You can start it from the Start Menu as listed below:Start Menu (Windows)  Programs  Nokia Developer Tools  Symbian3 SDK  <SDK version>  Tools Device ConnectionThe Device Connectivity Tool is started as shown below (latest screenshot showing EcmtAgent as the comment fora Device to be pasted instead):If the EcmtAgent has not been started on the phone, start the EcmtAgent on the phone (with Bluetooth as thebearer) and then click on Refresh button to display the device on the DCT. You should be able to see EcmtAgentlisted as Comment for one of the devices in the Device Connectivity Tool. Select this device and click on Connect.The Device Connectivity Tool should indicate that it is connected to the EcmtAgent as shown below:
  4. 4. The successful connection can also be seen on the EcmtAgent running on the phone (see below).
  5. 5. Eclipse SettingsEnsure that the Eclipse IDE has your Nokia Symbian^3 SDK recognized as an installed SDK. The informationprovided here is for Eclipse 3.5. Go to Window  Preferences and check that your SDK is displayed when youselect Java ME  Device Management as shown below:In the left pane of the same window, select Java  Debug, increase the Debugger timeout and Launch timeout to600000 ms as shown below:
  6. 6. Select JavaME in the left pane, and increase the Debugger Server time-out to 600000 ms.In Eclipse IDE, in the Java ME perspective, select Run  Debug Configurations … . Select “Emulated JavaMEMIDlet” in the left pane,and click on the “New launch configuration” button (shown selected in the belowscreenshot):This will open a new configuration on the right as shown below. In the MIDlet tab, select the Eclipse project andthe MIDlet that you want to debug.
  7. 7. Under the Emulation tab, select the Nokia Symbian^3 SDK as the SDK, and Symbian Device as Device as shownbelow:Click on the Apply button and then click on Debug to start the on-device debugging (note that you need to do theother settings for debugging, e.g. setting up breakpoints, before starting the debugging session).
  8. 8. NetBeans SettingsEnsure that the NetBeans IDE has your Nokia Symbian^3 SDK recognized as an installed SDK. The informationprovided here is for NetBeans 6.8. Similar settings can be done for earlier versions of NetBeans as well. Go to Tools Java Platforms to open the Java Platform Manager window. Check that your SDK is displayed here as a J2MEplatform. Verify that the SymbianDevice is available under the Devices tab for the SDK as shown below.Follow the steps mentioned in the section “Configuring the Nokia Symbian^3 SDK Emulator for NetBeans” in theSDK documentation (Nokia Symbian^3 SDK  Tools and Utilities  Java Development  NetBeans  Configuringthe Nokia Symbian^3 SDK Emulator for NetBeans) to increase the debug session time-out value of the IDE.In the Projects window of NetBeans, right-click on your project and select Properties. Ensure that Nokia Symbian^3SDK is selected as the Emulator Platform. Select SymbianDevice as the Device as shown below.
  9. 9. Right-click on your project in the Project window and select Debug to start the on-device debugging (note that youneed to do the other settings for debugging, e.g. setting up breakpoints, before starting the debugging session).
  10. 10. Other NotesThe progress of launching the MIDlet on the device is shown in a window “SDK progress” as shown below. Clickingon Hide will remove this window.To terminate the MIDlet running on the device at any point of time, you can click on Abort.If the MIDlet suite has multiple MIDlets, the MIDlet selection window is displayed as shown below. The user canselect the MIDlet (s)he wishes to run/debug.
  11. 11. After launching a MIDlet in the MIDlet suite, the user can click on the Add.. button in the SDK progress window.This will open the Add MIDlet window (as shown below) so that the user can select another MIDlet (in the MIDletsuite) to launch.