Installing JavaME on Ubuntu 12.04 – Netbeans

So after fiddling a bit , I found that the netbeans installed by default on Ubuntu 12.04 is version 7.1 – Now this is fine, but for some reason I couldn’t for the life of me get JavaME to work with this version. It would not allow me to install plugins which is what is needed in order to get JavaME working. Now this could have just been something specific to my machine, but nonetheless, here is how I solved it:

[box] 1. Ensure that the OpenJDK JRE and JDK are installed by issuing the following commands:

  • sudo apt-get install openjdk-7-jdk
  • sudo apt-get install openjdk-7-jre

[/box]

[box] 2. Download and install Netbeans 7.3 which comes with JavaME already packaged in the sh installation file [/box]

[box] 3. Once you have downloaded it, move the sh installation file to your desktop and run the following command: sh netbeans-installation-file.sh [/box]

[box] 4. This will ask you a while bunch of questions – simply follow the installation process [/box]

[box] 5. Now you need to download and install the Sun Java Wireless Toolkit 2.5.2_01 [/box]

[box] 6. Install it with: sh your-sun-wtk-file.sh

Something to take note of is that during installation you will most likely get a message saying: “No suitable Java interpreter was detected” – To solve this, simply press 0 and specify the following path: /usr/lib/jvm/java-1.7.0-openjdk-i386/bin/

[/box]

[box] 7. Once you have installed the WTK, you can then open Netbeans, click on Tools-> Java Platforms -> Add Platform -> Java ME CLDC Platform Emulator -> Then locate the WTK which you just installed, and you should be good to go!

[/box]

Cheerio!