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),conv
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
et_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.
- 上一篇:今天学习到的java中的几个知识点
- 下一篇:用Struts上传多个文件的方法
精彩图集
精彩文章