Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
bodaro
Posts: 7
Registered: ‎09-08-2008
My Device: Not Specified

rapc.exe command line reference

Hi, I am using rapc to convert a JAD+JAR to COD et al. So far, I'm guessing at the exact command line based onarticles from this forum and BB. I would like the reference for this command, does anyone know where I can find that?

 

Mike

Developer
marchywka
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: rapc.exe command line reference

Did you see my earlier posts? I had to guess using the output from the IDE build progress window. I posted a short

bash script to invoke it and AFAIK it does not print help when invoked without parameters.

 

I also tried the strings utility on the obfuscated classes reffed by rapc.exe, some entries are things like this many

of which may be command line options

 

tmpdir
exepath
import
        workspace
codename
midlet
class
MIDletMain
convertpng
noshortName
eviscerate
noeviscerate
noparsecod
noverifyerr
nodebug
debugclass
emitstatic
nocsl
export
        exclusive
brittle
--brittle option not supported for -target=3.6
1-brittle option not supported for -t0 or -nodebug
snapshot
nomain
nopackagewarning
rtninfo
javacompiler
javac
        javac.exe
jikes
        jikes.exe
wjava
        wjava.exe
gcj.exe
noloadtool
dump_preferred

 

 

New Developer
bodaro
Posts: 7
Registered: ‎09-08-2008
My Device: Not Specified

Re: rapc.exe command line reference

Thanks for the info, thats a step closer to the "reference"!

 

I am looking for the correct rapc commandline that will update my existing JAD file with the CAB entries. This is so I can use the SAME JAD for BlackBerry and non-BlackBerry clients.

 

Anyone know the magic incantation for this?

 

Using this:

 

rapc.exe import="C:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\lib\net_rim_api.jar" codename=BupBackupDev -midlet jad=BupBackupDev.jad BupBackupDev.jar

 

does not update the JAD file (and so is only useful for the simulator).

 

Mike

Developer
marchywka
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: rapc.exe command line reference

You can use bash scripts or otherwise do it manually, I'm using awk to fix the JAD files.

I'd post the entire strings output from the referenced classes but I think this editor has a size limit.

 

New Developer
bodaro
Posts: 7
Registered: ‎09-08-2008
My Device: Not Specified

Re: rapc.exe command line reference

So, I find that if I leave off the -midlet parameter rapx will modify my JAD file for me. But then it seems to create something (the .CAB) that just doesnt work (with the simulator at least). The docs talk about reusing the same JAD for JAR and COD deployments, but then how are we supposed to get the correct RIM entries for the JAD if I'm forced to use the -midlet option? I dont want to do it once without the -midlet option to get the RIM properties and then once again with the -midlet to get a valid COD as I would suspect the COD will be different each time.

 

Do I need the SHA-1 properties? Or maybe only if I sign the BB app?

 

This also brings up a new question: how do the JAD properties get "into" the Bb device when using OTA deployment? I wantt o modify the JAD AFTER the COD is created and BEFORE I ship the JAD to the phone('s browser) to put user-specific info in it. This technique works well in the normal J2ME world because I can read properties from the JAD at runtime. But for the BB devices, will my J2ME code have access to the JAd properties? I'm using version 4.2.1

 

Mike

Developer
marchywka
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: rapc.exe command line reference

I use awk with bash scripts and, AFAIK, RIM does not have uniform support for reading the JAD file as this was

an obvious thing to try at somepoint. In the past, I've used hybrid JAVA code that contain C++ preprocessor directive

and used the preprocessor in scripts to make various build types. For the RIM code, I'm just using awk rather than C++

to make changes but in any case JAVA and MIDLET support for these types of things is limited.

Developer
marchywka
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: rapc.exe command line reference

looking through the compiler class strings, there is some suggestion that  rim  supports conditionals :smileyhappy:

Anyone from RIM care to comment? I might actually give this a try in some code as it is a useful feature

but, yes, I have not found an actual reference manual anywhere.

 

New Developer
CobiRic
Posts: 21
Registered: ‎03-31-2011
My Device: Developer

Re: rapc.exe command line reference

sadly this whole command-line build thing is a secret that RIM is not prepared to help their developer community with.
www.cobiinteractive.com
www.madmob.co.za