如何在Blackberry平台上运行J2ME程序

一般来说,虽然blackberry支持java程序,但还是有如下的一些小细节步骤。

 

1. Only few things need to be changed based on the orginial J2ME code. Implement the Grpahic Wrapper and InputListener Wrapper for the Blackberry platform, which means technically instead of extends from GameCanvas, extends from BlackBerryGameCanvas, and implements KeyListener.


2. add external library(net_rim_api.jar) in your WTK


3. Build the application and generate the .jar file


4. Using RAPC.exe in windows prompt command line, convert the midlet to a COD as follows, all on one line (might be easier to make a .bat file out of this)
e.g: rapc import="c:/Program Files/Research in Motion/Blackberry JDE 4.7.0/lib/net_rim_api.jar" codename=ProductName  -midlet  "ProductName.jar"
This will generate a "ProductName .cod" file

5. Using javaloader.exe from a windows prompt command line to upload the newly created COD file to your blackberry (in my case USB connection)
e.g: javaloader -usb load ProductName.cod   或者  javaloader -usb load ProductName.jad  (jad已经指向对应的cod了)


备注: 有些Blackberry device 在OTA下载方式下,对单个cod文件有大小限制,所以如果cod文件太大需要对其分解成多个cod文件才能进行下载。

方法如下:
1. rename "ProductName.cod" to any name you want, for example "1.cod"
2. extract it using 7zip/winzip(any extract software), it will extract the cod file into several cod files. naming from "ProductName-1.cod" to "ProductName-xx.cod" (the corresponding .jad will also reflect this change)


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值