Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Developing Nokia Asha apps on Linux with Netbeans
This article explains how to use the Nokia Asha SDK 1.0 with Netbeans under Linux.
It's possible to use a native Netbeans install on Linux to develop software for the new Nokia Asha Software Platform. When the SDK is properly registered as a Java platform, we can use all the features of the Netbeans IDE, ranging from configuring and building the projects, to debugging and packaging them.
- Nokia Asha SDK 1.0 (install as described on this wiki page: Developing Nokia Asha apps on Linux)
- A Java6 or Java7 compatible JDK
Install the latest Netbeans version available for your platform (Ubuntu shown as an example)
or from the command line
sudo apt-get install netbeans
If you are on a platform that has an outdated version of Netbeans you can download the Netbeans version provided on the Netbeans project site itself. As an example, Ubuntu 13.04 is shipping with version 7.0.1 while the latest stable version of Netbeans at the time of writing this article was 7.3.1. In this case, make sure you have previously installed a compatible JDK. On Ubuntu, you can do this on the command line with
sudo apt-get install default-jdk
Enabling Java ME
Depending on the version and edition of Netbeans you downloaded and installed, the Java ME plugin might be missing or disabled. You can check this in the Tools -> Plugins submenu as per the screens below
Check the installed tab, if you have no active Mobility plugin with a Java ME category, select and install it from the available plugins tab. If the Mobility plugin is not listed in the available plugins tab, make sure the Netbeans distribution source is enabled in the settings tab.
Adding the Nokia Asha 1.0 SDK as a Java Platform
Adding the SDK as a full Java Platform to Netbeans is crucial to have full IDE functionality. Without this, there is no project documentation, autocomplete, project configuration (add/remove JAR/APIs) and debugging from within the IDE.
- Open Tools- >Java platforms
- Click add platform, and select Java ME CLDC Platform Emulator
- Go and select the .wine/drive_c/Nokia/Devices/Nokia_Asha_SDK_1.0 directory from your home, and then Netbeans should detect the details of the platform
If the detection fails (or the platform is shown with a red strikeover after addition), you are most likely missing proper emulator and preverify scripts which are provided on the Linux install wiki page.
Running a project
To verify the functionality, we can open an example that is provided with the Nokia Asha SDK, the Nokia Asha UI Component demos.
Note that .wine counts as a hidden directory under Linux, and so does not show up by default in the file selector. To avoid manually typing it in, and also to shorten the path when dealing with the examples, it's recommended to softlink the SDK directory into your home directory
ln -s ~/.wine/drive_c/Nokia_Asha_SDK_1.0
After opening the project, we can right click it in the projects tab, click properties and verify under platform that we have the right device and APIs selected
If everything looks correct, you should be able to develop, run and debug applications from Netbeans in Linux just as you would under Windows