How to install the Nokia S60 SDK in NetBeans for J2ME development

来源:互联网 发布:中国材料数据库 编辑:程序博客网 时间:2024/04/30 15:03

 

I’m starting a series of articles on how to install different Java mobile SDK’s from different mobile phone manufacturers. These SDK’s usually have emulators for their handsets that is needed in testing J2ME software. I’m starting off the series with a how-to for the Nokia S60 SDK.

 

Installing the Nokia S60 SDK for J2ME development is actually straight forward. Here’s the procedure:

NetBeansFirst off, you have to have a working NetBeans IDE 6.1. Although it might work for older NetBeans IDE versions, I’ve only tested it on NetBeans 6.1. The new NetBeans 6.1 has so much useful features for the developer so if you still haven’t installed it, I suggest you start upgrading your NetBeans first. This procedure also assumes a Windows environment.

Install the Nokia S60 SDK for J2ME

nokia-s60Download and install the Nokia S60 SDK for mobile Java development. The Nokia S60 SDK installer already has some support for the NetBeans and Eclipse IDE but you’d still have to do some extra steps on NetBeans and Eclipse. For now, I’ll focus on NetBeans.

The Nokia S60 SDK for J2ME requires Perl. If you don’t have Perl on your system, you’ll need to install Perl first. You can get a free copy of Perl for Windows from ActiveState.

Another note, when installing the Nokia S60 SDK, I suggest that you turn off the Carbide support if you’re not using Carbide. Aside from that, just follow the defaults.

Add Nokia S60 SDK support in the NetBeans IDE

Once you have installed the Nokia S60 SDK on your Windows system, you’ll need to do some extra steps in order to start using the Nokia S60 SDK in NetBeans.

After installing the Nokia S60 SDK, start up NetBeans and click on the menu Tools | Java Platforms. You should get a dialog box shown below. Click on Java ME MIDP Platform Emulator. Then click on Next.

install-nokia-sdk-on-netbeans-eclipse-screen-1

After clicking on Next, You will be prompted for the folder location of the Java Platform you want to add. In this case, you should select the directory where you installed the Nokia S60 SDK for J2ME. As shown in the sample screen below, I’ve installed it inC:/S60. Just select the directory where you installed the Nokia S60 SDK in your case if you have installed it in another directory.

install-nokia-sdk-on-netbeans-eclipse-screen-2

Once you click Search, the NetBeans IDE will add a directory on the list where it has detected a valid Java Platform. You need to make sure that the checkbox is selected and click on Next.

install-nokia-sdk-on-netbeans-eclipse-screen-3

NetBeans will then detect for valid configurations and devices installed in the selected directory. Once NetBeans is finished, you will see the detected configuration in the dialog box. Select the detected J2ME platform and click on Finish. At this point, you will have installed support for the Nokia S60 SDK for J2ME in your NetBeans IDE.

install-nokia-sdk-on-netbeans-eclipse-screen-4

Testing a J2ME application on the Nokia S60 emulator

You can now start testing a mobile Java application on the Nokia emulator. I have the SVG Contact List sample project installed on my NetBeans 6.1 so I’ve tested it on the Nokia S60 emulator.

For you to run the SVG Contact List sample NetBeans project, just right-click on it from your NetBeans project list. You will see a menu item labeled Run with … and just click on it. A dialog box shown below will be displayed. Select the S60 SDK J2ME platform. On the list of devices, select the S60Emulator .

After clicking on OK, you will see a dialog box show below and will be prompted to select which midlet to run.

install-nokia-sdk-on-netbeans-eclipse-screen-6

Just select ContactListSkin1 or ContactListSkin2 and click OK. The Nokia S60 SDK for J2ME should now continue loading the emulator and the Symbian OS inside the emulator. You should see similar screens below.

install-nokia-sdk-on-netbeans-eclipse-screen-7

install-nokia-sdk-on-netbeans-eclipse-screen-8

After loading, the S60 emulator will now prompt you to select an access point. Just select the default as shown on the screen below which is Winsock.

install-nokia-sdk-on-netbeans-eclipse-screen-9

install-nokia-sdk-on-netbeans-eclipse-screen-10

After selecting the access point, the compiled J2ME Jar file for the SVG Contact List sample NetBeans project should now start up on the S60 Emulator. You should start seeing the loading screen similar to the one below if you selected the second skin.

install-nokia-sdk-on-netbeans-eclipse-screen-12

After a while, you’ll now get the contact list.

install-nokia-sdk-on-netbeans-eclipse-screen-13

install-nokia-sdk-on-netbeans-eclipse-screen-14

Here’s a screen shot of how the SVG Contact List looks like if the S60 screen is 320×240 instead of the default 240×320.

install-nokia-sdk-on-netbeans-eclipse-screen-15

Just try it out and familiarize yourself with the Nokia S60 emulator and the sample J2ME program. Or try compiling some other sample programs or try to make one on your own.

Enjoy!

原文地址:http://gerry.ws/2008/07/868/how-to-install-the-nokia-s60-sdk-in-netbeans-for-j2me-development.html

 

原创粉丝点击