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. Thanks for all your past and future contributions.

Developing Nokia Asha apps on Linux

From Wiki
Jump to: navigation, search
Featured Article
04 Aug

This article explains how to use the Nokia Asha SDK 1.0 under Linux with WINE.

Article Metadata
Tested withCompatibilityArticle
Created: achipa (21 Jul 2013)
Last edited: kiran10182 (31 Oct 2013)



It is fully possible to develop Java ME and Nokia Asha Web Apps on Linux.

The Web Apps development environment is available as a native application for Linux (.deb package for Ubuntu/Debian) and does not require anything extra.

While the Nokia Asha SDK is not available in a native Linux form, we can use the toolchain and emulator via Wine from native IDEs like Netbeans or Eclipse on Linux (thus there is no speed overhead in the IDE itself). This is only possible on 32-bit i386 Linux environments.

The method used here is also applicable to previous versions of the Series 40 SDKs on Linux, but the integration scripts will need to be adapted for the different paths.

Nokia Asha SDK 1.0 running under Wine


To start with you need to install some software on your Linux system.

Install, in order:


First you need to have Wine installed on your Linux system. How that is done depends on your distribution, under Ubuntu you can do it via the Ubuntu Software Center.

Install Wine from the Ubuntu software center

If you prefer the console, on deb-based systems just enter from the command line:

sudo apt-get install wine

Check the Wine download page for instructions and packages for other distributions or newer version of Wine. The approach has been verified on Wine 1.4 and Wine 1.6


The new Asha SDK needs a JRE. Remember to install the (32bit) Windows version of the JRE from here. If you're running Ubuntu and have installed Wine, just double-click the JRE exe file.

Install JRE from Ubuntu

The terminal equivalent is

wine /path/to/jre-7u25-windows-i586.exe


Now you can install the Nokia Java SDKs, available from here. Always use the offline installers.

Under Ubuntu, you can double-click the Nokia Asha SDK installer just as you did the JRE. On the final page, uncheck launch Nokia IDE for Java (at this stage it will not function). Depending on your Linux environment, you should have the emulator icons set up on your desktop. Now you should be able to start the emulator as any other program.

Install Nokia Asha SDK 1.0 from Ubuntu

Running Java ME apps in the emulator/SDK

To run a .JAR of a Java ME application, you can use the Open menu option (your native Linux filesystem is under the Z: drive). Note that the emulator automatically uses the .JAD file present in the same directory as the .JAR file.

Open JAR

The image in the introduction shows what the Asha UI Component demos looks like when opened via the above method.

Enabling the SDK for IDE usage

Java defines the mechanism for how SDKs and emulators are identified and invoked by SDKs. In order for this to work with the Linux IDEs, these two scripts need to be added to the SDK install. Extract and copy them to the bin directory of the SDK. If you already have the Full Touch (Developer Platform 2.0) SDK, you can enable it the exact same way, just use these two scripts.

Copy emulator and preverify scipts

Plaintext clipboard-friendly version:

cd ~/.wine/drive_c/Nokia/Devices/Nokia_Asha_SDK_1_0/bin
cp ~/Downloads/emulator .
cp ~/Downloads/preverify .
chmod +x emulator preverify

This should be enough to make our SDK install fully functional. By invoking the emulator script, we can verify if everything is installed correctly.

Query emulator parameters

Plaintext clipboard-friendly version:

~/.wine/drive_c/Nokia/Devices/Nokia_Asha_SDK_1_0/bin/emulator -version 2> /dev/null
~/.wine/drive_c/Nokia/Devices/Nokia_Asha_SDK_1_0/bin/emulator -Xquery 2> /dev/null

Note.pngNote: For the technically inclined, here is the explanation why this is required. Even though the SDK's property file defines the correct executables, IDEs like Netbeans look for hard-coded file names, and fails to find them (the SDK directory has emulator.exe instead of emulator, etc). The other problem is that of classpaths. The paths should be separated by a colon on Windows and a semicolon on Linux. The two scripts above thus provide the executables that can get called from the IDEs and do the string transformations so that each side (the native IDE and the SDK within wine) can exchange classpath definitions.

This setup can be used for development from a native Netbeans install, for instructions see this article.

Series 40 Web apps

The Web Apps development environment is available as a set of native Linux applications. Everything should work fine under Linux "out of the box" - you can follow the instructions in the documentation for installation and configuration.

Testing your web apps can be done directly in the IDE, using local or cloud based preview. These are not perfect emulations of the Nokia Browser on the real devices.

Alternatively, the device emulators that come with the Java ME SDKs have the real native browsers installed. To test the Web Apps under the device emulators, copy & paste the URL given by the Web Tools when deploying and use the Open url... option in the emulators.


Now you should be able to develop and test Java ME apps under Linux with the Nokia Asha (and Series 40) device emulators! Enjoy.

This page was last modified on 31 October 2013, at 20:52.
154 page views in the last 30 days.