BlackBerryForums.com : Your Number One BlackBerry Community      

»Sponsored Links




Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
zeeple Offline
Knows Where the Search Button Is
 
Posts: 23
Join Date: Feb 2008
Model: 8830
PIN: N/A
Carrier: Sprint
Default J2ME dev on Linux for the BB - 02-21-2008, 11:00 AM

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 linux.com:

Linux.com :: 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.
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
rivviepop Offline
BlackBerry Extraordinaire
 
rivviepop's Avatar
 
Posts: 2,045
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Default 02-21-2008, 02:15 PM

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.
   
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On






Copyright © 2004-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1