Troubleshooting guide
260
BlackBerry Java Development Environment Development Guide
Working with compiled applications
When you build a project using the BlackBerry® Integrated Development Environment, the BlackBerry IDE
compiles your source files into Java™ bytecode, performs preverification, and creates a single .cod file and .jad file
for an application.
If an application contains more than 64 KB of bytecode or resource data, the BlackBerry IDE creates a .cod file
that contains sibling .cod files. To determine if a .cod file contains sibling .cod files, extract the contents of the
.cod file. Any .cod files within the original .cod file are the sibling files.
To identify modules that an application requires but are not provided with it, examine the application descriptor
(.jad) file RIM-COD-Module-Dependencies attribute.
See “Appendix: BlackBerry application .jad files” on page
281 for more information about BlackBerry application .jad file properties.
Load and remove applications
To load, remove, or save .cod files when testing applications, use the JavaLoader.exe tool. For production
applications, use the BlackBerry® Desktop Software.
1. Connect the BlackBerry device to the computer.
2. Open a command prompt, and navigate to the location of the JavaLoader.exe file.
3. Perform one of the following tasks:
Note: You must load applications with dependencies in the correct order. If project A is dependent on project B, load the project B
.cod file before loading the project A .cod file.
Task Steps
Load an application .cod file on the BlackBerry
device.
> Issue a command using the following format:
javaloader [-u] load <.cod file>
For example: javaloader.exe -u load MyApplication.cod
JavaLoader loads the .cod files listed in the .jad file on the BlackBerry device and
stores the .cod files in a CodeModuleGroup.
Load application .cod files listed in the same .jad
file on the BlackBerry device.
> Issue a command using the following format:
javaloader [-u] load <.jad file>
For example: javaloader.exe -u load MyApplication.jad
Javaloader loads the .cod files listed in the .jad file onto the BlackBerry device.
Remove an application .cod file from the
BlackBerry device.
> Issue a command using the following format:
javaloader [-u] erase [-f] <module>
For example: javaloader.exe -u erase MyApplication
Remove application .cod files listed in the same
.jad file from the BlackBerry device.
> Issue a command using the following format:
javaloader delete <.jad file>
For example: javaloader.exe delete MyApplication.jad
Remove application .cod files stored in the same
CodeModuleGroup from the BlackBerry device.
> Issue a command using the following format:
javaloader delete [-g] <module>
For example: javaloader.exe delete -g MyApplication