服务热线:13616026886

技术文档 欢迎使用技术文档,我们为你提供从新手到专业开发者的所有资源,你也可以通过它日益精进

位置:首页 > 技术文档 > JAVA > 新手入门 > 基础入门 > 查看文档

two tips about blackberry

although i have never used the blackberry device. i am still required to developing the j2me application on that kind of device. it is hard to begin, you know, you must...look up the website, download the simulator(a strange simulator),convert your j2me application into the format that can run on that device and so on.
as i have finished the task, there is two tips i'd like to record here.
first, how to convert your j2me application into the suitable format. when we get our j2me application, we have got two files: xxxx.jar,xxxx.jad. it is hard to use jde to import a whole java project -- the only way is to set up a new project and import the file one by one. so we can use the command line to convert our compiled java application into the suitable format, with the name as ".cod" to run in the blackberry no matter in simulator or in a real device. to use the console command you still need to download the jde and install it. then locate yourself to the folder where you install the jde,we suppose it as "<jde_home>".then open the path "<jde_home>/bin". copy your xxxx.jad and xxxx.jar files here. new a text file and rename it as "convert.bat". edit this file adding the line:"rapc import="<jde_home>/lib/net_rim_api.jar" codename=xxxx -midlet jad=xxxx.jad xxxx.jar" and then run it. you can get the files listed below: xxxx.jad,xxxx.jar,xxxx.debug,xxxx.cso,xxxx.cod. copy these five files to the folder "<jde_home>/simulator". and run your simulator. you can see the icon of the application in the screen meaning you can run your own java application.
second, how to use the network connection through the simulator. this problem has puzzled me much yesterday. and it is hard to find the answer form internet or may it is too eazy to answer. in fact it is very eazy. not only to run the simulator you also need to run the "mds simulator" to connect the network. it is contained in the start menu and is easy to do with it.

扫描关注微信公众号