= Requierments =
Blackberry JDE components installed. See:
Klang > Share > Installation Files > Device Simulators > BlackBerry_JDE_Components_4.2.0
= Converting Jad and Jar Files to a COD File =
· Copy jad and jar file to bin folder of the JDE Component package;
C:\Program Files\Research In Motion\BlackBerry JDE Component Package 4.2.0\bin
· Open JDE command prompt;
Start > Program Files > Research In Motion > BlackBerry > JDE Component Package 4.2.0 > JDE components command prompt.
· Change folder; (type "cd bin")
· Copy and paste to convert to cod; rapc import=..\lib\net_rim_api.jar -midlet jad=
To find the jad and jar in the folder, type first letter of jad and tab through until you find the required file to convert.
· Start with the jad,
· Space
· Then the jar.
· Enter
Assuming that there are no errors in the script (it will specify this) The files are now converted to COD. e.g of what the script should look like;
rapc import=..\lib\net_rim_api.jar -midlet jad=GekkoTester.jad GekkoTester.jar
Note: If using Vista, and the COD file is not created, then check the permissions on the bin folder as it may not have write permission. Right click on the folder and select properties. Select the security tab, set the permission to full control for 'Users'.
= Loading / Removing a COD file onto a Device and Simulators. =
== Loading Midlet on Simulators; ==
· Open the MDS first. (This allows you to use the browser)
· Open the Simulator
· Select; file, load java program, find the JDE component package folder, select the bin folder, select the COD.
· Select the Blackberry menu key (looks like a flower) then find the Midlet and open.
Note: If the midlet has already been installed, and you want to install an update, install as before and reset the simulator.
== Removing Midlet from simulators; ==
· Close the simulator
· Copy and paste in address for C Drive;
C:\Program Files\Research In Motion\BlackBerry Device Simulators 4.2.0\4.2.0.67 (8100-Vodafone)
· Then remove file 8100-vodafone-fs.dmp from the folder.
Note: On Windows Vista a hidden folder called AppData is created in the user folder. Using the command line, cd to the dir:
AppData\Local\VirtualStore\Program Files\Research In Motion\Blackberry Device Simulators 4.2.0\4.2.0.67 (8100-Vodafone)
== Loading Midlet on an actual device; ==
· Connect device to PC via a mini usb cable
· Open JDE command prompt
· Change folder to bin (type "cd bin")
· Type javaloader -usb load
· Space
· Type the Midletname.cod (e.g Absolut.cod)
· Enter
Example: javaloader -usb load <midlet name>.cod
== Removing Midlet from an actual device; ==
· Connect device to PC via a mini usb cable
· Open JDE command prompt
· Change folder to bin (type "cd bin")
· Type "javaloader -usb erase -f"
· Space
· Type the Midletname.cod (e.g Absolut.cod)
· Enter
If you are unable to find the file (sometimes the midlet name is saved differently on the device), type "javaloader -usb dir" which will then list all applications on the device. find the app you wish to erase using "javaloader -u erase -f" then the (name), and then enter.
**Note; You are unable to install a midlet application if an older version is already installed. So you need to remove the Old version first.
= Batch file processing =
As an alternative to copying the JAD and JAR to the bin directory you could also just run a batch file.
Create a new text file and call it JAR2COD.bat
ECHO convert JAR 2 COD
move convert\%1.jar bin\
move convert\%1.jad bin\
bin\rapc import=lib\net_rim_api.jar -midlet jad=bin\%1.jad bin\%1.jar
mkdir convert\%1
move %1.* .\convert\%1\
move %1-*.* \convert\%1\
· Save the file to the Blackberry JDE directory.
· Create a now folder called 'convert'.
· Place the JAD and JAR files here.
· Run the script from the command prompt:
· JAR2COD.bat <MIDlet name>
This will convert the JAR and create a new folder inside the 'convert' folder with the name of the MIDlet and place all the generated files in it. The advantage is that it leaves the bin directory clean from all the generated files.
No comments:
Post a Comment