In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
In this issue, the editor will bring you about how to develop BlackBerry applications in the NetBeans Java ME polish environment. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.
How to use BlackBerry API to develop all aspects of BlackBerry application.
But we are generally developed in Java ME, and the programs developed are in jar format and can run on most models of mobile phones. However, BlackBerry does not support jar, it supports the cod format. So if you want your Java ME program to run on BlackBerry, you must first convert it to cod format.
To convert a general Java ME program to cod, you can transfer it in the program development and compile the program, or you can convert it to the packaged jar.
◆ converts the packaged jar file to BlackBerrycod format: enter the directory where the jar file is located, enter the corresponding directory in cmd (command line), and enter the following command: quote rapc import= "C:\ Program Files\ Research In Motion\ BlackBerry JDE 4.2.1\ lib\ net_rim_api.jar" codename=TestBB jad=TestBB.jad TestBB.jar
(note: here rapc is the rapc.exe in the C:\ Program Files\ Research In Motion\ BlackBerry JDE 4.2.1\ bin\ directory. If the environment variable is not set, use the absolute path: C:\ Program Files\ Research In Motion\ BlackBerry JDE 4.2.1\ bin\ rapc. Of course, you can write it as a .bat file to execute. On the Internet, you can search for a Mini Program called Java2Cod.exe that can be converted directly.)
◆ compiles programs in JDE: whether you are developing Java ME programs in BlackBerry API or Java ME/midp API, you can compile on JDE. Eventually he will automatically package it into a cod file.
◆ is compiled and packaged in its IDE: because I was developed in NetBeans, I can only provide insights into developing BlackBerry programs with NetBeans. I use Java ME polish to integrate the development in NetBeans. The following describes the development of BlackBerry programs in Java ME polish
(please refer to http://www.j2mepolish.org/docs/platform-blackberry.html)
First, find platforms.xml in the Java ME polish installation directory, and in the BlackBerry section inside, add (I am using Preview version 2.0, in which this sentence is commented out, so to activate it, you can also add this sentence in the emulator attribute you want to use in devices.xml. Without this sentence, jar will not be automatically converted to cod files at compile time.)
The version supported in polish * is 4.2.0. If you install BlackBerry version * such as 4.2.1 BlackBerry 4.3.0, then you need to add ${BlackBerry directory} / lib/net_rim_API.jar copy to ${Java MEpolish} / import and modify it in platforms.xml BlackBerry.
Add the blackberry.home attribute to the build.xml of the project (the BlackBerry JDE directory where you installed it)
Java code
Third, if you compiled and packaged jad file missing MicroEdition-Configuration and MicroEdition-Profile two attributes will not be successfully converted into cod file. This can be added to the element in the attribute in the build.xml of the project:
Java code
Fourth, if you use the obfuscator (obfuscator), you should unactivate it, do not use it, because the rapc conversion process in BlackBerry will confuse the program.
Java code
5. The attribute requirements in the build.xml of the project uses the BlackBerryemulator you want to compile, such as:
Java code
If your program is a normal Java ME program, then you can compile and run it. But if you are developing in BlackBerry API, change the element in build.xml to, and add polish.classes.midlet-1 's variable at the same time. Such as:
Java code
(note: the value of polish.classes.midlet-1 is "", with a space in the middle. I have tried. Without this definition variable or without a space in the middle of the value, jar cannot be converted to cod format.)
The above is the editor for you to share how to develop BlackBerry applications in the NetBeans Java ME polish environment, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 218
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.