Setting up the environment

This pages guide you through finding, installing, and configuring NetBeans with the Nokia Asha SDK. The subsequent pages cover using the IDE to create an app, test it on a PC with the SDK emulator, and run the app on a phone.

Please note that the video shows the Nokia Asha SDK 1.0 — the steps and actions are still applicable to the Nokia Asha SDK 1.2.

  1. Check your system requirements.
  2. Install the latest 32-bit Java Development Kit (JDK).
  3. Install the NetBeans IDE’s ‘all’ package.
  4. Install the Nokia Asha SDK using either the online or offline installer.
  5. Activate the Java ME option in NetBeans using Plugins on the Tools menu.
  6. Add the Visual Mobile Designer from Plugins.
  7. Add your SDK to NetBeans’ list of Java platforms, using Java Platforms on the Tools menu.

Step-by-step — Get and setup the tools

Step 1 — Check your system requirements

Check that you have a computer with the following:

  • Microsoft Windows 7 Enterprise, Professional, or Ultimate Editions; Service Pack 1; 32- or 64-bit (recommended) or Microsoft Windows 8 Professional or Enterprise, 32- or 64-bit
  • 2.8 GHz Intel Pentium class processor
  • 2 GB RAM
  • 1GB free disk space, more if you plan to install multiple SDKs
  • Display capable of displaying 24-bit colour at 1280x1024 pixel resolution
  • Sound card
  • Network interface card

Step 2 — Install the Java Development Kit (JDK)

To develop software with the NetBeans IDE and the Asha SDK for Java (or the earlier Nokia SDKs for Java and Series 40 release SDKs) you must download the 32-bit Java Development Kit (JDK) and install it on your computer.

Once you have downloaded the JDK, run the installer and follow the installation instructions.

Step 3 — Install the NetBeans IDE

The NetBeans IDE is offered in a number of download configurations. The ‘all’ configuration is the only one that includes the Java ME tools in the download package, however the Java ME pack can be added to any of the versions after installation. For simplicity the ‘all’ version of NetBeans 7.3 is used in this guide.

Once you have downloaded the NetBeans IDE, run the installer and follow the installation instructions.

Step 4 — Install the Nokia Asha SDK

This getting started guide is based on the latest Nokia Asha SDK, however, each release of earlier Series 40 platforms is also supported by an SDK. To choose the right SDK for your development, check out the details on the releases and the APIs each SDK supports here. In summary, for phones containing the Java Runtime for Series 40 you use the Nokia SDK for Java whose version matched the runtime’s version, for earlier releases simply match the platform version to the SDK name.

If you have a particular phone in mind as the target for your application, you can find out which release it’s built on or the Java Runtime it contains by consulting the Devices section. You can also use the Device SDK Selector tool in the Nokia Asha SDK to find the right SDK, this is covered in the next step.

In choosing the right SDK for your development, it’s recommended that you start with the SDK for the earliest version of the Nokia Asha or Series 40 platform you wish to support. Taking this approach simplifies development. To explain, if you want your app to run on Series 40 5th Edition phones, using this SDK for development means you can be confident that your app will run on all later Nokia Asha platform and Series 40 platforms. Starting with the latest edition may mean you need to redesign the app to make it work on earlier Series 40 releases, as later editions may include an API which isn’t available on an earlier edition.

Note: Some of the earlier SDKs require you to register them after 15 days; this process uses a key based on your Nokia Developer user name. There is no cost associated with registering; all of the SDKs are available free-of-charge. You can register the SDK earlier by opening the SDK emulator and on the Help menu clicking Register Now.

For this guide we are using the Nokia Asha SDK 1.1. With this SDK, you create apps for Nokia Asha phones with Java Runtime for Nokia Asha software platform (1.1), which supports the New Asha UI interface and provides the full range of APIs available on these phone. This SDK then enables you to test these applications against an emulation of the Nokia Asha 502.You have two installer options: a download of the complete SDK (the offline version) and a version that downloads the latest software when you run the installer (the online version). There is an installation guide included in each package if you need further assistance.

Once you have downloaded the SDK extract the content of the zip, run the installer and follow the installation instructions.

Step 5 — Activate the Java ME option in the NetBeans IDE

Start the NetBeans IDE.

Now you need to activate the Java ME pack. To do this on the Tools menu, click Plugins. In the Plugins dialogue click the Installed tab, select Java ME and click Activate, as shown below.

NetBeans Getting Started figure 1 - Activate the Java ME plug-in

The NetBeans IDE Installer dialogue displays, click Activate. The plug-in is now activated. When complete, in the Plugins dialogue click Finish.

Step 6 — Install the Mobile Visual Designer

While you can code your apps directly with the Java ME plug-in installed, the Mobile Visual Designer provides a number of drag-and-drop tools that simplify the creation of mobile apps. It’s also used in the getting started. To install Mobile Visual Designer, in Plugins click Available Plugins and select Mobile Visual Designer (it can be found easily using the Search option) and then click Install. Now follow the installation instructions.

Step 7 — Add your SDK to the NetBeans IDE’s list of Java platforms

On the Tools menu, click Java Platforms to view a list of the SDKs that have been integrated with the NetBeans IDE. If the Nokia Asha SDK 1.0 isn’t listed, click Add Platform. The Add Java Platform dialogue displays, as shown below. Select Java ME MIDP Platform Emulator and click Next.

NetBeans Getting Started figure 2 - Add a Java ME platform

NetBeans searches your PC for installed Java ME platforms.

Note: If the NetBeans IDE doesn’t find the SDK you installed, click Find More Java ME Platform Folders and select the folder in which you installed the SDK. NetBeans will then search that folder for SDKs that support Java ME.

You can now select the SDK, as shown below.

NetBeans Getting Started figure 3 - Select an SDK

Click Next. The NetBeans IDE detects the SDK’s capabilities and displays them. Click Finish to complete the addition of the SDK. Close the Java Platforms dialogue.

Your development environment is now set and you are ready to create your first Nokia Asha platform Java app.

Create a project and start coding your app ›