Showing posts with label S40. Show all posts
Showing posts with label S40. Show all posts

Tuesday, July 08, 2008

Getting NetBeans 6.1 to work with Nokia Symbian S40 and S60 SDKs

For Symbian S60 SDK
It seems that the steps to get the S60 SDK to work with NetBeans 6.1 isn't that intuitive (read: we need to scour the documentation to get it right), and the information isn't (easily) found on the Net, so I'll write it down here to share.

(If you get a NullPointerException thrown by the SDK, complaining that it failed to initialize session at the Connect to Agent step, you might want to try these steps to configure NetBeans to recognise the S60 SDK properly. )

In order to get NetBeans to be able to launch the S60 emulator successfully (to test run our midlet projects), we need to take note when configuring NetBeans to recognise the S60 platform.

This obscure information can be found in your NetBeans help section if you installed the S60 SDK enabling the automatic integration with NetBeans IDE.
S60 3rd Edition SDK for Symbian OS, Feature Pack 2 > Tools and Utilities > Using the SDK with an IDE > Java Development > NetBeans > Installing and configuring NetBeans

1) In NetBeans, select Tools > Java Platforms.

2) Select Add Platform.

3) Select the radio option Java ME MIDP Platform Emulator, click next and wait~~~.

4) If the S60 SDK isn't listed, click on Find More Java ME Platform Folders and select the main folder where your S60 SDK is installed. Select the S60 SDK and click next.

5) NetBeans will autodetect the platform details (the MIDP profiles, CLDC configurations and optional APIs supported by the SDK) if the correct folder/SDK was selected. What remains is to click on finish to add the S60 SDK into the list of Java Platforms for NetBeans.

6) Use the S60 Emulator in a project configuration and run the main project as per normal. You should see that the emulator fires up as it should =)


For Symbian S40 SDK
The steps to configure NetBeans with the S40 SDK are similar.

1) In NetBeans, select Tools > Java Platforms.

2) Select Add Platform.

3) Select the radio option Custom Java ME MIDP Platform Emulator, and click next.

4) Click on Browse to select the main folder where your S40 SDK is installed.

5) Give the platform and device names. Click Next, then Finish to add the SDK to the list of Java Platforms.

6) Use the S40 Emulator in a project configuration and run the main project as per normal.