BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-04-2007, 08:40 PM   #1 (permalink)
New Member
 
Join Date: Oct 2007
Model: 8800
PIN: N/A
Carrier: T-Mobile
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating JAD with RIM's Extensions

Please Login to Remove!

I am doing my development in NetBeans and have compiled the application into a COD file using rapc. I want to deploy the application over-the-air and using rapc doesn't create a new JAD file with RIM's Extensions to the original JAD Files, such as:
RIM-COD-Creation-Time
RIM-COD-Module-Dependencies
RIM-COD-Module-Name
RIM-COD-SHA1
RIM-COD-SIZE
RIM-COD-URL

Is there a way to generate these extensions?

Thanks,
-Jonathan
Offline  
Old 10-05-2007, 01:01 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: May 2005
Location: Golden, CO US
Model: 9700
Carrier: ATT
Posts: 684
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you give rapc an "rapc" file, it'll produce a fully filled out jad file.

Ant snippet...
Code:
    
<java jar="${rim.jde.home}/bin/rapc.jar" dir="build/output" failonerror="true" fork="true">
      <arg line="-quiet -nowarn -import='${rim.jde.home}/lib/net_rim_api.jar'"/>
      <arg line="-codename=yourproject"/>
      <arg line="-rapc=yourproject.rapc"/>
      <arg line="../lib/yourproject.jar"/>
    </java>
RAPC file...
Code:
MIDlet-Name: YourProject
MIDlet-Description: YourDescription
MIDlet-Version: 0.0.0
MIDlet-Vendor: YourCompany
MIDlet-Jar-URL: yourproject.jar
MIDlet-Jar-Size: 0
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.1
MIDlet-1: YourDescription,img/yourproject.png,
RIM-MIDlet-Flags-1: 0
Offline  
Old 10-06-2007, 03:15 PM   #3 (permalink)
New Member
 
Join Date: Oct 2007
Model: 8800
PIN: N/A
Carrier: T-Mobile
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

So I got rapc to compile and create the JAD, but only if I do *not* include the "-midlet" option.

My specific command line looks like:
rapc.exe import="C:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\lib\net_rim_api.jar" codename=MyCode -rapc=MyCoderapc MyCode.jar

Without this option, however, I get the error:
Warning!: No definition found for exported static routine: .main(String[])

Any suggestions how to avoid this error but still make the JAD file?

Thanks,
-Jonathan
Offline  
Old 10-06-2007, 03:18 PM   #4 (permalink)
CrackBerry Addict
 
Join Date: May 2005
Location: Golden, CO US
Model: 9700
Carrier: ATT
Posts: 684
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sounds like you're creating a J2ME Midlet instead of a Blackberry native app. I guess I should have asked.

Look in the JDE directory for a tool called UpdateJad. I thinkk that will do what you need.
Offline  
Old 10-06-2007, 04:00 PM   #5 (permalink)
New Member
 
Join Date: Oct 2007
Model: 8800
PIN: N/A
Carrier: T-Mobile
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes - it is a J2ME application. Here is the process I am going through:
1) Compile app into a JAR using Netbeans
2) Use rapc to convert the jar to a cod
3) Double click the COD and sign it (I use the secure APIs of GPS and http)
4) Use winzip to separate the COD into its 2 separate files (program.cod and program-1.cod)
5) Download app over the air

UpdateJad appears to just update the jar file size attribute and not create a new JAD with the appropriate fields like the SHA1 signature, etc.
Offline  
Old 11-23-2007, 03:24 PM   #6 (permalink)
New Member
 
Join Date: Nov 2007
Model: 8100
PIN: N/A
Carrier: T-Mobile
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Jonathan,

I am having exactly the same problem - did you find a solution?

I cannot create a modified JAD when I use the -midlet option.
Offline  
Old 01-08-2008, 08:30 AM   #7 (permalink)
New Member
 
Join Date: Jan 2008
Model: 7100t
PIN: N/A
Carrier: bb
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default problem in Deploying jar(which published in mds studio) in device

Hi.,

I had done a webservices application in mds studio and published the same. Now i got .jar file only. If i want to download the app thru OTA, i could not use .jar file. It is asking for .jad file.

Then i created .jad file by using jadmaker.exe. But when i gave the path for this jad in bookmark( in simulator) its asking for "midlet name",midlet version.
I updated the jad and it started downloading the application.

But atlast point it shows error like " invalid cod file" .

what should i do?
can anybody help me on this?

Shansi
Offline  
Old 06-25-2008, 06:20 AM   #8 (permalink)
New Member
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: T-Mobile
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Bumping this thread because I am experiencing the same problems as jonathangmiller.

I am running Rapc like this:

rapc import="net_rim_api.jar" codename=TEST -midlet jad=test_bb8100.jad test_bb8100.jar

Please note that I have moved "net_rim_api.jar" to the same directory as rapc.

As jonathangmiller mentions, this builds me a .cod file, but it does not create a .jad file.
Offline  
Old 06-25-2008, 11:12 AM   #9 (permalink)
Thumbs Must Hurt
 
Join Date: May 2008
Model: 8700
PIN: N/A
Carrier: Telcel
Posts: 69
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by reach.shansi View Post
Hi.,

I had done a webservices application in mds studio and published the same. Now i got .jar file only. If i want to download the app thru OTA, i could not use .jar file. It is asking for .jad file.

Then i created .jad file by using jadmaker.exe. But when i gave the path for this jad in bookmark( in simulator) its asking for "midlet name",midlet version.
I updated the jad and it started downloading the application.

But atlast point it shows error like " invalid cod file" .

what should i do?
can anybody help me on this?

Shansi
For MDS Studio and Visual Studio MDS Plugin you need to publish your application to a BES Manager with MDS Service. You won't ever be able to install a MDS application if you are not deploying it to a BES Manager
Offline  
Closed Thread


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-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.