Showing posts with label Java. Show all posts
Showing posts with label Java. 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.

Sunday, March 30, 2008

Java Control Panel in Vista

It seems that Java’s Control Panel needs administrator rights in order for some configurations to work, but when I need to configure settings for the current user, it becomes a pain in some part of the body.

Here’s how to open the Java control panel using the user account and not the administrator account:

  1. Navigate to C:\Program Files\Java (where you installed Java)

  2. Press F3 for search
  3. Type in cpl and search for the file
  4. You should see the cpl files used to launch the Java control panel

  5. Double click on it to run it using the current user account

  6. After doing what you need to do, when the applet closes, Vista might prompt to always open the cpl file using administrator rights. Say NO! (select “This control panel works correctly”)

To run it using administrator rights, instead of step 5, right click on the cpl file and select “Run as administrator”)