10-02-2008 11:50 AM - edited 10-02-2008 11:55 AM
I have a probleme porting an app from j2me to blackberry. I used rapc.exe on Windows to build a .cod with my midlet and it worked well.
But now i need to do that on a unix server. I copied rapc.jar in the folder containing my midel and executed that :
java rapc.jar import=net_rim_api.jar codename=WebTest -midlet jad=WebTest.jad WebTest.jar
But it returns :
Exception in thread "main" java.lang.NoClassDefFoundError: rapc/jar
Do someone has a solution for me ?
PS : excuse me for the mistakes, i'm french and i dont speak very well english.
10-02-2008 02:40 PM
Did this work on windoze? The "/" indicates it is taking rapc.jar as a qualified class name and trying to call main().
Obviously, the CLASS LOADER can't find rapc.jar on the classpath. You need to fix the java invokation syntax.
I've never actually tried to do this as I've had good luck with cygwin and don't have debian handy right now.
I thought you needed things like rapc.EXE but that would be great if the essentials are either java or sun tools.
Presumably this would work if I had files and a more complete classpath
$ java -classpath "./rapc.jar" net.rim.tools.compiler.Compiler
Error: no files to process
10-03-2008 02:06 AM
On Windows i used a batch that do this :
:RUN @"C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\bin\rapc" import="C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\lib\net_rim_api.jar" codename=WebTest -midlet jad=WebTest.jad WebTest.jar
It works perfectly but it call rapc.exe, and obviously i can't use it on a unix platform, so i though i could user rapc.jar but it dont seems to work, or i don't use it well.
10-03-2008 03:04 AM
It Works !
I just wrote that script :
#!/bin/bash # Classpath du JDE blackberry RIM=/home/dev/davy/blackberry/MDS/classpath java -jar $RIM/rapc.jar import=$RIM/net_rim_api.jar codename=$1 -midlet jad=$1.jad $1.jar
It seems i was not using the good rapc.jar.
09-23-2009 09:09 PM
What is the recommended way for running rapc on UNIX?
I found postings such as
that suggest it is not possible to do that for JDE versions prior to 4.1.