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.

11 comments:

DA said...

Good instructions, but it doesn't really solve the error (NullPointerException)in the Connect to Agent step;

Have you experienced this problem before?

Unknown said...

Well, the troubleshooting began because I was getting the NullPointerException errors =)

It seems that I might have changed a few things as part of my troubleshooting. Let me outline the other things that I did (maybe that would help?)

- uninstalled S60 SDK
- installed ActiveState's ActivePerl
- reinstalled S60 SDK

DA said...

I'll give it a try, thanks!

SeƱor Poteito said...

Cool, I have it working now but I need to read data from GPS. I want to save long & lat in a XML file...
Can you help me? thanks a lot!!

Unknown said...

juaxix: I'm afraid I can't help you with your query currently, I'm totally clueless with regards to that area!

Matias Pequeno said...

Good guide to install new Emulator SDKs. But it doesn't solve the Connect to Agent problem.
I've seen the Nokia forums and this problem has been for about a whole year and there is no solution yet.
Nokia support for mobile development has always been a joke and it always will be!

Unknown said...

Hi MatuX, thanks for dropping a comment.

These steps solved the problem for me actually, this was because I installed the mobile SDKs wrongly that time.

Removing them from NetBeans and then re-adding them to NetBeans using the steps outlined above did solve the problem.

Are you still getting the same issues with it even after adding in the SDKs using these steps?

Yeah, it's really tough to get good help on Nokia mobile development, hope this changes soon, heh.

Anonymous said...

I followed your instructions

- uninstalled S60 SDK
- installed ActiveState's ActivePerl
- reinstalled S60 SDK

But the problem can't be solved. In the Connect to Agent step, it threw "NullPointerException"

(I re-installed S60 SDK FP1 four times ! :( )

SarahC said...

Oh noes!

GunBlad3, the Netbeans site is down. =( I'm trying to get Netbeans 6.7.1 Mobility for my S40 dev pack, but I haven't had any look finding alternative download sites.

I found Netbeans 6.7.1 on the Sun site, but it lacks the Mobility add-on so I wasn't able to add the S40 components in "tools/add package".

I've no idea how long the sites been down for either, it might be a long-term problem!

Do you know any alternative places to download the software?

Helllllp!

http://untamed.co.uk

Unknown said...

Hi SarahC, unfortunately I don't know of any alternate download sites.

Seems that the problem you faced was temporary, I was able to access http://netbeans.org/downloads/ when I tried just now. Perhaps you could try again?

Alwin Co Daan said...

Great Article
B.Tech Final Year Projects for CSE in JavaScript

FInal Year Project Centers in Chennai

JavaScript Training in Chennai
JavaScript Training in Chennai