BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 02-21-2008, 12:00 PM   #1 (permalink)
Knows Where the Search Button Is
Join Date: Feb 2008
Model: 8830
Carrier: Sprint
Posts: 29
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default J2ME dev on Linux for the BB

Please Login to Remove!

I am looking at starting to learn J2ME so that I can purse a few midlet ideas I've got brewing. I am starting with this tutorial at :: Writing J2ME applications in Linux

So my first question for anyone else who is currently developing midlets on linux for their BB, which do you recommend from this page:

Java SE Downloads

JDK6/4 or JDK6/4 with JavaEE? Doesn't look like NetBeans IDE is supported for linux.
Old 02-21-2008, 03:15 PM   #2 (permalink)
BlackBerry Extraordinaire
rivviepop's Avatar
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Posts: 2,166
Post Thanks: 0
Thanked 0 Times in 0 Posts

While not conversant with J2ME development, I am heavily involved with java appservers under linux and the JDK. You want just the basic JDK 6 update 4, you don't need the the EE versions.

Here's how I maintain java on a linux box:

1) download the "self extracting archive" version, not the RPM or other ones
2) use symlinks to have your system find the java tools; it's easier if I just show you the commands.

Assuming you've downloaded the self extracting JDK archive to /tmp/ (replace as necessary), do this as root:

cd /usr/local/
sh /tmp/jdk-6u4-linux-i586.bin

... hit spacebar to page through license agreement, type YES and enter to accept ...

ln -s jdk1.6.0_04 java
cd bin
ln -s ../java/bin/ja* .
This unpacks the JDK to /usr/local/jdk1.6.0_04, symlinks "java" to the numbered JDK, then places symlinks in /usr/local/bin/ to 'java', 'jar', 'javac', and so on - all the tools. When you need to upgrade/downgrade the JDK, all you do is follow the same steps and change the symlink /usr/local/java to point at the desired JDK and everything falls into place.

If you want it to work smoothly everywhere, I suggest adding two lines to /etc/profile (or /etc/bashrc. but I like /etc/profile) to tell all apps where java lives:

export JAVA_HOME
Combined with the symlinks above, every time you upgrade java now all your apps will just naturally pick it up. The above assumes /usr/local/bin is in the PATH variable for everyone, which is usually the case with 99% of the linux I've ever encountered.
[ Linux & BlackBerry ]

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.