BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 07-08-2008, 10:23 AM   #1 (permalink)
Knows Where the Search Button Is
Join Date: Nov 2007
Model: 8830
Carrier: Sprint
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default JDE on Linux/Mac

Please Login to Remove!

Following an old thread on this forum I've been successfully building Blackberry .cod files using only the rapc.jar. To do this I jar my source files and invoke rapc passing it my source jar and including any dependencies (Eg. KXml) in the import argument to the compiler. The net result is a .cod file that loads perfectly fine on my Blackberry 8830. Traditionally I've been building my project using a combination of the JDE preverify.exe and the rapc compiler. This results in a much smaller cod file size. (half the size.)

My question is what's the subtle difference in what I'm doing now versus the way compiles typically run using preverify.exe from the JDE prior to invoking rapc? I have a lot of low level questions regarding how resources such as images are located. I'm having a hard time because in either scenario I don't include my resources directory (where my app artwork is located) in the compile yet these resources seem to find their way into the resulting cod file. It's really confusing how these things work. What's even more confusing is how fat my cod file is when I compile Java source files with rapc vs. running preverify.exe against javac compiled classes and passing these to rapc. I thought rapc did obfuscation? Something is telling me that I'm somehow getting extra stuff included (the source files?) in the final cod file when I run rapc against an archive of .java files. Can somebody shed some light here? I feel like I'm so close to understanding everything but I missing some important pieces.

I looked for rapc cmd line documentation to try to find preverify/obfuscation options but came up short. Is there some secret behind all of this? Does anyone know of better docs for the cmd line tools? Has anyone else been down this road?
Old 01-16-2009, 08:30 AM   #2 (permalink)
New Member
Join Date: Jan 2009
Model: 4.2.1
Carrier: T-mobile
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts

Hi all,

I have another problem. Can anyone please suggest any way?
I am trying to build the cod file in linix(cent os) using the source file direct, not using jar/jad(seperate generated by sun wireless tool kit or j2me Polish).
I have used following shell script
java -jar $RIM/bin/rapc.jar import=$RIM/lib/net_rim_api.jar codename=$RIM/JT/JT -midlet $RIM/JT/JT.rapc @$RIM/JT/JT_build.files .

I am getting error "I/O Error: preverify: not found"

I JDE there was "preverify.exe" in /bin. But how can I overcome that in linux. Is there any compatable jar file for preverify?

Using jar & jad then raw source following command works fine in linux :
java -jar $RIM/bin/rapc.jar import=$RIM/lib/net_rim_api.jar codename=$RIM/JT/JT -midlet jad=$RIM/JT/JT.jad $RIM/JT/JT.jar

Thanks in advance.

Old 01-20-2009, 10:01 AM   #3 (permalink)
New Member
Join Date: Jan 2009
Model: 9350
Carrier: Informatique
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Use JDE with Linux


I have worked about this subject...

I give you quickly the info to build a COD file from Java file.

mkdir -p ~/BlackBerry/projects
$ cp -R /opt/RIM/sdk/samples/com/rim/samples/device/helloworlddemo ~/BlackBerry/projects

$ cd ~/BlackBerry/projects
$ cat >


PATH=$PATH:$PREVERIFY java -jar $SDK/bin/rapc.jar \
import=$SDK/lib/net_rim_api.jar \
codename=$1 \
$1.rapc \
*.java \

$ cd ~/BlackBerry/projects/helloworlddemo
$ ../ HelloWorldDemo
$ l
total 44
-rw-r--r-- 1 nicolas users 7888 déc 30 12:26 HelloWorldDemo.cod
-rw-r--r-- 1 nicolas users 152 déc 30 12:26 HelloWorldDemo.cso
-rw-r--r-- 1 nicolas users 4464 déc 30 12:26 HelloWorldDemo.debug
-rw-r--r-- 1 nicolas users 545 déc 30 12:26 HelloWorldDemo.jad
-rw-r--r-- 1 nicolas users 10393 déc 30 12:26 HelloWorldDemo.jar
-rwxr-xr-x 1 nicolas users 3228 déc 27 13:42*
-r-xr-xr-x 1 nicolas users 291 déc 30 12:13 HelloWorldDemo.rapc*
drwxr-xr-x 2 nicolas users 88 déc 27 11:36 img/

You can find info about it on my website :
www . progweb . com/modules/blackberry

You can also build a COD file from a middlet (jad / jar files).

I have also written a little application to load you COD file into your device :
This tool is now integrated in the GIT repository of Barry project.


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