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:
Code:
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:
Code:
JAVA_HOME=/usr/local/java
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.