Professional Documents
Culture Documents
version 1.0
Online help
BlackBerry JDE Plug-in for Eclipse version 1.0 Online help
At the time of publication, this documentation is based on BlackBerry JDE Plug-in for Eclipse version 1.0
©2008 Research In Motion Limited. All Rights Reserved. The BlackBerry and RIM families of related marks, images, and symbols are the
exclusive properties of Research In Motion Limited. RIM, Research In Motion, BlackBerry, “Always On, Always Connected” and the “envelope in
motion” symbol are registered with the U.S. Patent and Trademark Office and may be pending or registered in other countries.
Eclipse is a trademark of Eclipse Foundation, Inc. Java and JavaDoc are trademarks of Sun Microsystems, Inc. Microsoft, Vista, and Windows are
trademarks of Microsoft Corporation. All other trademarks are the property of their respective owners.
The BlackBerry smartphone and other devices and/or associated software are protected by copyright, international treaties, and various
patents, including one or more of the following U.S. patents: 6,278,442; 6,271,605; 6,219,694; 6,075,470; 6,073,318; D445,428; D433,460;
D416,256. Other patents are registered or pending in the U.S. and in various countries around the world. Visit www.rim.com/patents for a list of
RIM (as hereinafter defined) patents.
This documentation including all documentation incorporated by reference herein such as documentation provided or made available at
www.blackberry.com/go/docs is provided or made accessible "AS IS" and "AS AVAILABLE" and without condition, endorsement, guarantee,
representation, or warranty of any kind by Research In Motion Limited and its affiliated companies ("RIM") and RIM assumes no responsibility
for any typographical, technical, or other inaccuracies, errors, or omissions in this documentation. In order to protect RIM proprietary and
confidential information and/or trade secrets, this documentation may describe some aspects of RIM technology in generalized terms. RIM
reserves the right to periodically change information that is contained in this documentation; however, RIM makes no commitment to provide
any such changes, updates, enhancements, or other additions to this documentation to you in a timely manner or at all.
This documentation might contain references to third-party sources of information, hardware or software, products or services including
components and content such as content protected by copyright and/or third-party web sites (collectively the "Third Party Products and
Services"). RIM does not control, and is not responsible for, any Third Party Products and Services including, without limitation the content,
accuracy, copyright compliance, compatibility, performance, trustworthiness, legality, decency, links, or any other aspect of Third Party Products
and Services. The inclusion of a reference to Third Party Products and Services in this documentation does not imply endorsement by RIM of
the Third Party Products and Services or the third party in any way.
EXCEPT TO THE EXTENT SPECIFICALLY PROHIBITED BY APPLICABLE LAW IN YOUR JURISDICTION, ALL CONDITIONS, ENDORSEMENTS,
GUARANTEES, REPRESENTATIONS, OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY
CONDITIONS, ENDORSEMENTS, GUARANTEES, REPRESENTATIONS OR WARRANTIES OF DURABILITY, FITNESS FOR A PARTICULAR
PURPOSE OR USE, MERCHANTABILITY, MERCHANTABLE QUALITY, NON-INFRINGEMENT, SATISFACTORY QUALITY, OR TITLE, OR ARISING
FROM A STATUTE OR CUSTOM OR A COURSE OF DEALING OR USAGE OF TRADE, OR RELATED TO THE DOCUMENTATION OR ITS USE,
OR PERFORMANCE OR NON-PERFORMANCE OF ANY SOFTWARE, HARDWARE, SERVICE, OR ANY THIRD PARTY PRODUCTS AND
SERVICES REFERENCED HEREIN, ARE HEREBY EXCLUDED. YOU MAY ALSO HAVE OTHER RIGHTS THAT VARY BY STATE OR PROVINCE.
SOME JURISDICTIONS MAY NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES AND CONDITIONS. TO THE EXTENT
PERMITTED BY LAW, ANY IMPLIED WARRANTIES OR CONDITIONS RELATING TO THE DOCUMENTATION TO THE EXTENT THEY CANNOT
BE EXCLUDED AS SET OUT ABOVE, BUT CAN BE LIMITED, ARE HEREBY LIMITED TO NINETY (90) DAYS FROM THE DATE YOU FIRST
ACQUIRED THE DOCUMENTATION OR THE ITEM THAT IS THE SUBJECT OF THE CLAIM.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, IN NO EVENT SHALL RIM BE LIABLE FOR ANY TYPE
OF DAMAGES RELATED TO THIS DOCUMENTATION OR ITS USE, OR PERFORMANCE OR NON-PERFORMANCE OF ANY SOFTWARE,
HARDWARE, SERVICE, OR ANY THIRD PARTY PRODUCTS AND SERVICES REFERENCED HEREIN INCLUDING WITHOUT LIMITATION ANY
OF THE FOLLOWING DAMAGES: DIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, INDIRECT, SPECIAL, PUNITIVE, OR AGGRAVATED
DAMAGES, DAMAGES FOR LOSS OF PROFITS OR REVENUES, FAILURE TO REALIZE ANY EXPECTED SAVINGS, BUSINESS INTERRUPTION,
LOSS OF BUSINESS INFORMATION, LOSS OF BUSINESS OPPORTUNITY, OR CORRUPTION OR LOSS OF DATA, FAILURES TO TRANSMIT OR
RECEIVE ANY DATA, PROBLEMS ASSOCIATED WITH ANY APPLICATIONS USED IN CONJUNCTION WITH RIM PRODUCTS OR SERVICES,
DOWNTIME COSTS, LOSS OF THE USE OF RIM PRODUCTS OR SERVICES OR ANY PORTION THEREOF OR OF ANY AIRTIME SERVICES,
COST OF SUBSTITUTE GOODS, COSTS OF COVER, FACILITIES OR SERVICES, COST OF CAPITAL, OR OTHER SIMILAR PECUNIARY LOSSES,
WHETHER OR NOT SUCH DAMAGES WERE FORESEEN OR UNFORESEEN, AND EVEN IF RIM HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, RIM SHALL HAVE NO OTHER OBLIGATION, DUTY,
OR LIABILITY WHATSOEVER IN CONTRACT, TORT, OR OTHERWISE TO YOU INCLUDING ANY LIABILITY FOR NEGLIGENCE OR STRICT
LIABILITY.
THE LIMITATIONS, EXCLUSIONS, AND DISCLAIMERS HEREIN SHALL APPLY: (A) IRRESPECTIVE OF THE NATURE OF THE CAUSE OF
ACTION, DEMAND, OR ACTION BY YOU INCLUDING BUT NOT LIMITED TO BREACH OF CONTRACT, NEGLIGENCE, TORT, STRICT LIABILITY
OR ANY OTHER LEGAL THEORY AND SHALL SURVIVE A FUNDAMENTAL BREACH OR BREACHES OR THE FAILURE OF THE ESSENTIAL
PURPOSE OF THIS AGREEMENT OR OF ANY REMEDY CONTAINED HEREIN; AND (B) TO RIM AND ITS AFFILIATED COMPANIES, THEIR
SUCCESSORS, ASSIGNS, AGENTS, SUPPLIERS (INCLUDING AIRTIME SERVICE PROVIDERS), AUTHORIZED RIM DISTRIBUTORS (ALSO
INCLUDING AIRTIME SERVICE PROVIDERS) AND THEIR RESPECTIVE DIRECTORS, EMPLOYEES, AND INDEPENDENT CONTRACTORS.
IN ADDITION TO THE LIMITATIONS AND EXCLUSIONS SET OUT ABOVE, IN NO EVENT SHALL ANY DIRECTOR, EMPLOYEE, AGENT,
DISTRIBUTOR, SUPPLIER, INDEPENDENT CONTRACTOR OF RIM OR ANY AFFILIATES OF RIM HAVE ANY LIABILITY ARISING FROM OR
RELATED TO THE DOCUMENTATION.
Prior to subscribing for, installing, or using any Third Party Products and Services, it is your responsibility to ensure that your airtime service
provider has agreed to support all of their features. Installation or use of Third Party Products and Services with RIM's products and services
may require one or more patent, trademark, copyright, or other licenses in order to avoid infringement or violation of third party rights. You are
solely responsible for determining whether to use Third Party Products and Services and if any third party licenses are required to do so. If
required you are responsible for acquiring them. You should not install or use Third Party Products and Services until all necessary licenses
have been acquired. Any Third Party Products and Services that are provided with RIM's products and services are provided as a convenience to
you and are provided "AS IS" with no express or implied conditions, endorsements, guarantees, representations, or warranties of any kind by
RIM and RIM assumes no liability whatsoever, in relation thereto. Your use of Third Party Products and Services shall be governed by and
subject to you agreeing to the terms of separate licenses and other agreements applicable thereto with third parties, except to the extent
expressly covered by a license or other agreement with RIM.
The terms of use of any RIM product or service are set out in a separate license or other agreement with RIM applicable thereto. NOTHING IN
THIS DOCUMENTATION IS INTENDED TO SUPERSEDE ANY EXPRESS WRITTEN AGREEMENTS OR WARRANTIES PROVIDED BY RIM FOR
PORTIONS OF ANY RIM PRODUCT OR SERVICE OTHER THAN THIS DOCUMENTATION.
Published in Canada
Contents
1 BlackBerry JDE Plug-in for Eclipse.................................................................................................................... 5
Enable functionality similar to the BlackBerry Java Development Environment.................................... 5
Create an application for a specific version of the BlackBerry Device Software.................................... 5
Using a workspace for a BlackBerry Application......................................................................................... 6
Associate an Eclipse workspace with a workspace for a BlackBerry Application ........................... 6
Switch to a different workspace for a BlackBerry Application ............................................................7
Specify properties for a workspace for a BlackBerry Application.......................................................7
Specify build rules for a workspace for a BlackBerry Application ......................................................7
Delete a workspace for a BlackBerry Application from a workspace in Eclipse .............................. 8
Using a project for a BlackBerry Application ............................................................................................... 8
Create a project for a BlackBerry Application....................................................................................... 8
Add a project for a BlackBerry Application ........................................................................................... 9
Add a project for a BlackBerry Application from an existing BlackBerry JDE workspace.............. 9
Add a file to a project for a BlackBerry Application............................................................................. 9
Remove a file from a project for a BlackBerry Application ................................................................. 9
Specify general settings for a project for a BlackBerry Application.................................................10
Specify application settings for a project for a BlackBerry Application ..........................................10
Specify localization settings for a project for a BlackBerry Application...........................................11
Specify compiler settings for a project for a BlackBerry Application............................................... 12
Specify settings for how a project for a BlackBerry Application builds ...........................................13
Building a BlackBerry Application.................................................................................................................14
Using build configurations......................................................................................................................14
Associate a start configuration with a build configuration for a BlackBerry Application.............15
Using preprocessor directives ................................................................................................................16
Working with code signing protection.......................................................................................................... 17
Register to use BlackBerry protected APIs........................................................................................... 17
Request code signatures ......................................................................................................................... 17
Request a replacement registration key ...............................................................................................18
Run a BlackBerry Application that uses protected APIs.....................................................................18
Prevent a BlackBerry Application that runs on the BlackBerry Smartphone Simulator from ac-
cessing protected APIs ............................................................................................................................18
Use a code signing key to protect packages and classes ..................................................................19
View signature status for code signature requests .............................................................................19
Managing resources for localization.............................................................................................................19
Resource files a BlackBerry Application uses for localization ..........................................................20
Create a resource header or a resource content file for a BlackBerry Application.......................20
Determine if all resource keys in a resource collection are used in a project................................. 21
Find all .java files that use a resource key ............................................................................................ 21
Define an original locale ......................................................................................................................... 21
Mark a translation as correct or incorrect ............................................................................................ 21
Displaying unicode characters ..................................................................................................................... 22
Display unicode characters in the Java editor window ..................................................................... 22
Working with Icons ......................................................................................................................................... 22
Specify the position of a BlackBerry Application icon....................................................................... 22
Finding object leaks........................................................................................................................................ 22
View statistics to locate object leaks.................................................................................................... 22
Find an object leak .................................................................................................................................. 23
Display objects in memory to locate object leaks .............................................................................. 23
Optimizing code using the Profiler .............................................................................................................. 24
Specify Profiler options........................................................................................................................... 24
Generate Profiler data ............................................................................................................................ 25
View Profiler data .................................................................................................................................... 25
Save the contents of the Profiler pane to a .csv file...........................................................................26
View Javadoc for items in resource files in a project for a BlackBerry Application ......................26
Configuring the BlackBerry Smartphone Simulator.................................................................................. 27
Specify a BlackBerry Smartphone Simulator for a specific BlackBerry smartphone type ........... 27
Add a BlackBerry Application to the BlackBerry Smartphone Simulator that is running............ 27
Debug a BlackBerry Application on a BlackBerry Smartphone Simulator that is running .......... 27
Specify general settings for the BlackBerry Smartphone Simulator ............................................... 27
Specify the appearance of the BlackBerry Smartphone Simulator ................................................. 28
Specify debugging preferences for the BlackBerry Smartphone Simulator...................................29
Specify how the BlackBerry Smartphone Simulator interacts with the network...........................29
Specify the ports the BlackBerry Smartphone Simulator uses.........................................................30
Specify how the BlackBerry Smartphone Simulator manages memory...........................................31
Set the BlackBerry Smartphone Simulator to erase data.................................................................. 32
Manually erase BlackBerry Smartphone Simulator data................................................................... 32
Specify advanced features for the BlackBerry Smartphone Simulator ........................................... 32
Debug an application on a BlackBerry Smartphone ................................................................................. 33
Set preferences for running a BlackBerry Application in debug mode........................................... 33
Set the next statement for a BlackBerry Application in debug mode ............................................. 34
Testing a BlackBerry Application with the BlackBerry Smartphone Simulator .................................... 34
Test a BlackBerry Application that uses an HTTP connection.......................................................... 34
Open a web site in the BlackBerry browser when the BlackBerry Smartphone Simulator starts....
35
Start a BlackBerry Application when the BlackBerry Smartphone Simulator starts..................... 35
Add a BlackBerry Application to the BlackBerry Smartphone Simulator .......................................36
Run a BlackBerry Application in the BlackBerry Smartphone Simulator .......................................36
View output from the BlackBerry Smartphone Simulator .................................................................36
Test a BlackBerry Application with the BlackBerry smartphone.............................................................36
Distributing a BlackBerry Application in a production environment...................................................... 37
Distribute a BlackBerry Application using the BlackBerry Desktop Manager............................... 37
Distributing a BlackBerry Application from a web page ................................................................... 37
Related resources............................................................................................................................................ 37
1
BlackBerry JDE Plug-in for Eclipse
You can use the BlackBerry® JDE Plug-In for Eclipse™ to develop, debug and test BlackBerry Applications from
within Eclipse™ and Eclipse-based IDEs. You can use the BlackBerry JDE Plug-in for Eclipse to develop
applications for BlackBerry devices. The BlackBerry JDE Plug-in for Eclipse contains a subset of the features and
components included in the BlackBerry® Java® Development Environment.
Task Steps
Create a project for a BlackBerry 1. On the File menu, click New > Project.
Application in an Eclipse 2. Expand the BlackBerry folder.
workspace.
3. Select BlackBerry project.
4. Click Next.
5. In the Project name field, type a name.
6. Click Next.
7. Click Finish.
Import a project for a BlackBerry 1. On the File menu, click Import.
Application into an Eclipse 2. Expand the BlackBerry folder.
workspace.
3. Select Existing BlackBerry Projects into Workspace.
4. Click Next.
5. In the Select BlackBerry files field, click Browse.
6. Select a BlackBerry project file.
7. Click Open.
8. Click Next.
9. Click Finish.
6
1: BlackBerry JDE Plug-in for Eclipse
Task Steps
Import a workspace for a BlackBerry 1. On the File menu, click Import.
Application into an Eclipse 2. Expand the BlackBerry folder.
workspace.
3. Select Existing BlackBerry Projects into Workspace.
4. Click Next.
5. Beside the Import projects field, click Browse.
6. Select a BlackBerry workspace file.
7. Click Open.
8. Select the BlackBerry workspace files to import.
9. Click Finish.
Task Steps
Specify a project version to apply to all projects in the workspace. > Type a project version in the Project Version Override
field.
Specify a project vendor to apply to all projects in the workspace. > Type a vendor name in the Project Vendor Override field.
Compress resources to save space. > Select Compress resources if significant space gain.
Specify preprocessor directives > Under Preprocessor defines, click Add.
Delete preprocessor directives > Under Preprocessor defines, select a directive and click
Delete.
Edit preprocessor directives > Under Preprocessor defines, select a directive and click
Edit.
For more information on directives, see “Using preprocessor directives” on page 16.
5. Click OK.
7
BlackBerry JDE Plug-in for Eclipse online help
Task Steps
Add a build rule. 1. Click Add.
2. In the File Extension field, type a file extension.
3. In the Target File Extension field, type a file extension.
4. In the Build Rule field, type a build rule, for example, copy $srcfile $dstfile.
5. Click OK.
Delete a build rule. 1. In the Implicit build rule field, select a build rule.
2. Click Delete.
Edit a build rule. 1. In the Implicit build rule field, select a build rule.
2. Click Edit.
3. Perform one or more of the following actions:
• In the File Extension field, change the file extension.
• In the Target File Extension field, change the file extension.
• In the Build Rule field, change the build rule.
4. Click OK.
8
1: BlackBerry JDE Plug-in for Eclipse
4. Click Finish.
9
BlackBerry JDE Plug-in for Eclipse online help
3. Click OK.
Setting Description
Title Type a descriptive name for the project.
To create a keyboard shortcut for an application, add the Unicode underscore character (\u0332) after
a letter in the title. For example, for the Hello World application, type H\u0332ello World. When the
user presses the h key on the BlackBerry smartphone Home screen, the Hello World application starts.
If more than one application uses the same keyboard shortcut, the application that appears first on the
Home screen starts.
Version Type the version number of the project.
Vendor Type the name of the company that owns the project.
Description Type a description for the project.
Always make project active Select this option to make the project always active.
Excluded from “Build All” Select this option to prevent the project from being built when you click Build All on the Project menu.
6. Click Apply.
7. Click OK.
Setting Description
Project type In the Project type drop-down list, select one of the following
options:
• CLDC Application: an application that uses CLDC/MIDP and
BlackBerry APIs
• MIDlet: an application that uses MIDP APIs only
• Library: a library on which other applications can depend on.
10
1: BlackBerry JDE Plug-in for Eclipse
Setting Description
Alternate entry point for In the drop-down list, click another project in the workspace that this
project invokes.
Note: This field is available only if the project type is Alternate CLDC
Application Entry Point.
Name of main MIDlet class Type the name of the class that extends
javax.microedition.midlet.MIDlet.
Note: This field is available only if the Project type is MIDlet or
Alternate MIDlet Entry Point.
Arguments passed to “static public void main(String args[])” Specify arguments to pass into the application main() method.
Note: This field is available only if the project type is ECMAScript,
CLDC Application, or Alternate CLDC Application Entry Point.
Home screen position (0 if no preference) To set the position of the application icon on the Home screen, type a
number from 1 to 255, where 1 is highest priority and 255 is lowest
priority.
Note: This field is not available if the Project type is Library.
System module Select this option to run the application in the background, without
displaying an icon on the BlackBerry smartphone Home screen.
This field is not available if the Project type is Library.
Auto-run on startup Select this option to start the application automatically when the
BlackBerry device starts.
This option is not available if the Project type is MIDlet.
Note: Auto-run applications must be digitally signed by RIM to run on
BlackBerry smartphones.
Startup tier If the Auto-run on startup option is selected, select a startup tier to
determine the priority with which the application is started, in
relation to other applications.
For third-party applications, you can select 6 or 7 (other start-up tiers
are reserved for BlackBerry Applications). If you do not specify a start-
up tier, the default tier is 7 (lowest priority).
Note: This option is not available if the Project type is MIDlet.
6. Click Apply.
7. Click OK.
11
BlackBerry JDE Plug-in for Eclipse online help
Setting Description
Title Resource Available Select this option if the application's title and description have been internationalized in a resource
bundle.
Resource Bundle Select the resource header file to use for this application, such as HelloWorldRes.
Title Id Select the resource key to use for the application title, such as APPLICATION_TITLE. If you do not
provide a resource for the application title, the BlackBerry IDE uses the Title field on the General tab.
Description Id Select the resource key to use for the application description, such as APPLICATION_DESCRIPTION. If
you do not provide a resource for the application description, the BlackBerry IDE uses the Description
field on the General tab.
Icon files Select the image files to use for application icons.
Focus Icon files Select the image files to use for application icons in focus.
6. Click Apply.
7. Click OK.
Setting Description
Output messages about what the compiler is doing Select this option to view detailed compiler information when you build
this project.
Note: Selecting this option is the same to setting the -verbose option for
rapc.
If you select this option, Eclipse™ will create many “rapc_XXXX.dir"
directories in the %TEMP% directory during compilation.
Generate no warnings Select this option to hide compiler warnings when you build this project.
Tip: Warnings do not prevent the project from being built successfully,
but they can indicate possible errors in your code.
Treat warnings as errors Select this option to stop compilation if warnings occur.
Output source locations where deprecated APIs are used Select this option to view the location of deprecated APIs in the source
files.
Don't convert image files to png Select this option to prevent image files from being converted to .png
format. Select this option if your application needs to access raw image
data on the BlackBerry smartphone.
12
1: BlackBerry JDE Plug-in for Eclipse
Setting Description
No warning for no exported static routine: .main(String[]) Select this option to prevent the compiler from issuing a warning if
main() is undefined.
Preprocessor defines Add, remove, or edit directives used by the preprocessor when processing
java files. For more information on directives, see “Using preprocessor
directives” on page 16.
Alias list To repackage existing API libraries into a new library project, list one or
more libraries that this project replaces, separated by a semi-colon (;).
For example, if you are creating a library project called “newlib” that
repackages existing libraries “libA” and “libB”, you can specify libA;libB
in this field so that .cod files that use those libraries continue to work
correctly.
6. Click Apply.
7. Click OK.
Setting Description
Output file name Specify the name of the .cod file that is output for the project. If this field is empty, the project name is used.
Pre build step Type a command that Eclipse™ runs before building the project.
You can use regular expressions. If you do not specify an absolute path, file locations are relative to the folder
in which this workspace is located.
Post build step Type a command that Eclipse™ runs after building the project.
You can use regular expressions. If you do not specify an absolute path, file locations are relative to the folder
in which the workspace is located.
Clean step Type a command that Eclipse™ runs when you click Clean or Clean All on the Build menu.
Imported alx files Click Add to add external .alx files that you want to build with your application. You can use this option to include
applications on which your project depends that are not in the current workspace. The .alx files that you add
here are included in <requires id> tags in the .alx file that is generated for your project.
6. Click Apply.
7. Click OK.
13
BlackBerry JDE Plug-in for Eclipse online help
14
1: BlackBerry JDE Plug-in for Eclipse
Task Steps
To open the start configuration dialog box to > On the Run menu, click Run Configurations.
manage a run mode start configuration.
To open the start configuration dialog box to > On the Run menu, click Debug Configurations.
manage a debug mode start configuration.
Task Steps
To associate the start configuration with a debug > Click Debug.
build configuration.
To associate the start configuration with a private > Click Private.
build configuration.
To associate the start configuration with a release > Click Release.
build configuration.
To associate the start configuration with a custom > Click the name of the build configuration.
build configuration.
Task Steps
To add a source to the start 1. Click Add.
configuration. 2. In the Add source dialog box, select the type of source to add to the source lookup path.
3. Press OK.
4. Find and select the source.
To remove a source from the 1. In the Source Lookup Path field, select a source.
start configuration. 2. Click Remove.
15
BlackBerry JDE Plug-in for Eclipse online help
Task Steps
To associate the start configuration with a debug > Click Debug.
build configuration.
To associate the start configuration with a private > Click Private.
build configuration.
To associate the start configuration with a release > Click Release.
build configuration.
To associate the start configuration with a custom > Click the name of the build configuration.
build configuration.
Directive Description
//#preprocess This directive specifies that a file must be preprocessed.
//#ifdef tag ... #else ... #endif This directive specifies that the block before the else is compiled if tag is specified.
Otherwise, only the block after the else is compiled.
//#ifndef tag ... #else ... #endif This directive specifies that the block before the else is compiled if tag is not
specified. Otherwise, only the block after the else is compiled.
16
1: BlackBerry JDE Plug-in for Eclipse
17
BlackBerry JDE Plug-in for Eclipse online help
18
1: BlackBerry JDE Plug-in for Eclipse
3. Select an existing start configuration for a BlackBerry Smartphone Simulator, or create a new one.
4. Click the Simulator tab.
5. Click the General tab.
6. Click Enable device security.
7. Click Run.
Option Description
Use as default for public Specify the .key file as the .key file that is used to protect all public classes.
classes
Use as default for non-public Specify the .key file as the .key file that is used to protect all non-public classes.
classes
5. Find the name of the package that contains packages and classes that you will protect with the .key file.
6. Expand the package contents.
7. Select each element that requires access control.
8. Click Ok.
19
BlackBerry JDE Plug-in for Eclipse online help
A ResourceBundle object stores information and resources for a locale. A ResourceBundleFamily object
contains a collection of ResourceBundle objects. An application can use a ResourceBundleFamily object to
display information in a language that is specific to the locale of the BlackBerry device user.
When you compile a BlackBerry Application, the BlackBerry JDE Plug-in for Eclipse compiles each
ResourceBundle object that you include with the application into a separate code (.cod) file. You can load the
appropriate .cod files onto a BlackBerry device along with other files the application requires.
See the BlackBerry Java Development Environment Fundamentals Guide for more information about managing
resources for localization.
20
1: BlackBerry JDE Plug-in for Eclipse
5. In the New BlackBerry Resource File dialog box, select the project folder for the BlackBerry Application.
6. In the File name field, type the name of the .rrc or .rrh file.
7. Click Finish.
21
BlackBerry JDE Plug-in for Eclipse online help
Column Description
# objects number of objects that are currently in memory
Bytes in use amount of memory that is used by objects
Allocated total memory that is allocated to the Java Virtual Machine
Free memory that is available
22
1: BlackBerry JDE Plug-in for Eclipse
Row Description
Object handles number of object handles in memory
RAM RAM usage
Flash sum of the other three rows
Transient objects (flash) number of transient objects in flash memory
Persistent objects (flash) number of persistent objects in flash memory
Code modules (flash) number of code modules in flash memory
23
BlackBerry JDE Plug-in for Eclipse online help
Note: To improve the reliability of results when you run the profiler application, exit other Microsoft® Windows® applications.
24
1: BlackBerry JDE Plug-in for Eclipse
25
BlackBerry JDE Plug-in for Eclipse online help
View Description
Summary The Summary view displays general statistics about the system and the garbage collector.
It displays the percentage of time that the Java VM has spent idle, executing code, and performing quick and full
garbage collection. The Percent column displays the percent of total JVM running time, including idle and
collection time.
Method The Method view displays a list of modules, sorted either by the information that you are profiling or by the number
of times each item has been executed.
In this view, the Percent column displays the percentage of JVM execution time only, not including idle and garbage
collection time.
Source The Source view displays the source lines of a single method. You can navigate through the methods that call, and
are called by, that method.
You can expand a source line to show individual bytecode.
You can further expand any bytecode that corresponds to a method invocation to show the target(s) of the method
invasion.
26
1: BlackBerry JDE Plug-in for Eclipse
27
BlackBerry JDE Plug-in for Eclipse online help
• To work with an existing start configuration, under BlackBerry Simulator, select a start configuration.
• To work with a new start configuration, right-click BlackBerry Simulator, select New.
3. Click the Simulator tab.
4. Click the General tab.
5. Select one or more of the following options:
Option Description
Launch simulator when debugging tool connects start the BlackBerry Smartphone Simulator when you start the debug process.
Minimize when launching simulator Minimize the BlackBerry Smartphone Simulator when you start it.
Launch Mobile Data Service (MDS) with simulator Start the BlackBerry MDS simulator when you start the BlackBerry Smartphone
Simulator. With the BlackBerry MDS Simulator you can test network
applications, push applications, and browser applications.
Launch app or URL on start up Specify an application to start or a URL to display when the JVM starts.
Device Specify the model number of the BlackBerry Smartphone Simulator that starts
when you run an application.
Automatically use default values for all prompts Specify all dialog boxes to automatically select a default choice.
PIN Specify the PIN of the BlackBerry Smartphone Simulator.
ESN Specify the Electronic Serial Number of the BlackBerry Smartphone Simulator.
If unspecified, the number is generated from the PIN.
Enable device security Specify the BlackBerry Smartphone Simulator to simulate a secure BlackBerry
smartphone.
System locale Specify the locale of the BlackBerry Smartphone Simulator.
Keypad locale Specify the locale of the keypad of the BlackBerry Smartphone Simulator. The
default value is "en".
Do not save settings Specify that the BlackBerry Smartphone Simulator does not save changes to its
UI and dialog boxes when it closes.
Option Description
Disable automatic backlight shutoff Specify that the backlighting of the BlackBerry® Smartphone Simulator remains turned on.
28
1: BlackBerry JDE Plug-in for Eclipse
Option Description
Hide network-specific information Specify that the BlackBerry Smartphone Simulator does not display network information.
Display the LCD only Specify that the BlackBerry Smartphone Simulator only displays the LCD screen.
Full or relative path to a Config-Pack Specify the path to a BlackBerry Smartphone Simulator configuration.
LCD height (pixels) Specify that the BlackBerry Smartphone Simulator displays the LCD screen using a specified
height, in pixels.
LCD zoom Specify that the BlackBerry Smartphone Simulator displays the LCD screen using a specific
zoom level.
Always keep LCD backlight on Specify that the LCD backlight stays on after the idle timeout period.
Do not show help for key mappings Specify that help for key mappings is not displayed.
Option Description
Interrupt the debugger tool on Stop program execution if the JVM detects a thread deadlock.
potential deadlock
Do not stop execution when an Continue program execution when an exception is caught by a catch(Throwable th)
exception is caught by “catch( block.
Throwable )”
Specify how the BlackBerry Smartphone Simulator interacts with the network
To perform the following steps, you must first create a new BlackBerry® Smartphone Simulator profile or choose a
non-default profile from the Profile drop-down list.
1. On the Run menu, click Debug Configurations or Run Configurations.
2. Perform one of the following tasks:
• To work with an existing start configuration, under BlackBerry Simulator, select a start configuration.
• To work with a new start configuration, right-click BlackBerry Simulator, select New.
3. Click the Simulator tab.
4. Click the Network tab.
29
BlackBerry JDE Plug-in for Eclipse online help
Option Description
Disable registration Prevent the BlackBerry Smartphone Simulator from registering with the network.
Network Specify a string describing one of the available networks. Use the following format:
“{param}:value;{param}:value".
Start with radio off Start the BlackBerry Smartphone Simulator with the wireless transceiver off.
Phone number Specify the phone number of the BlackBerry Smartphone Simulator.
Automatically answer outgoing calls Specify that the BlackBerry Smartphone Simulator automatically answers outgoing calls.
IMEI Specify the International Mobile Equipment Identity (IMEI).
ICCID (GPRS) Specify the 19 or 20-digit serial number of the simulated SIM card.
IMSI (GPRS) Specify a 15-digit number to designate the subscriber.
Simulate SIM not present Specify that the BlackBerry Smartphone Simulator reports the SIM card as missing.
IP Address For a computer with multiple network interfaces, explicitly select the interface that the
BlackBerry Smartphone Simulator uses for network operations.
Ignore UDP port conflicts Suppress warnings that the BlackBerry Smartphone Simulator produces when it is unable to
bind to a selected port.
SMS source port Specify the UDP port that the BlackBerry Smartphone Simulator uses to receive SMS text
messages.
SMS destination port Specify the UDP port that the BlackBerry Smartphone Simulator uses to send SMS text
messages.
PDE port Specify the PDE port that the BlackBerry Smartphone Simulator uses for GPS access. This
setting is for CDMA devices only.
Option Description
USB cable connected Simulate the BlackBerry Smartphone Simulator as connected to the USB port of a computer.
Bluetooth test board port Specify the port number that a Bluetooth text board is connected to.
30
1: BlackBerry JDE Plug-in for Eclipse
Option Description
Application heap size (in bytes) Specify the size of RAM on a BlackBerry Smartphone Simulator that the JVM can use for all
memory allocation. By default, the BlackBerry Smartphone Simulator sets a size based on the
BlackBerry Smartphone Simulator type.
Branding data Specify the data that the BlackBerry Smartphone Simulator uses for the branding sector of the
BlackBerry Smartphone Simulator flash memory.
Reset the filesystem on startup Specify that the BlackBerry Smartphone Simulator erases filesystem data when it starts.
Reset NVRAM on startup Specify that the BlackBerry Smartphone Simulator erases system non-volatile storage data
when it starts.
Filesystem size (bytes) Specify the size of simulated flash memory that the BlackBerry Smartphone Simulator uses as
the filesystem. The BlackBerry Smartphone Simulator uses a specific size depending on the
BlackBerry Smartphone Simulator type.
Do not save flash data on simulator exit Specify that the BlackBerry Smartphone Simulator does not save changes to flash memory
when it closes.
Do not compact filesystem on exit Specify that the BlackBerry Smartphone Simulator does not compact filesystem data when it
closes.
Simulate no SD Card inserted Specify that the BlackBerry Smartphone Simulator does not create files that represent SD
Card data.
Create new SD Card image Specify that the BlackBerry Smartphone Simulator creates a new SD Card file instead of using
an existing SD Card file.
SD Card size Specify the size for new SD Cards that a BlackBerry Smartphone Simulator uses. The default
size is 32 MB.
SD Card image Specify that the BlackBerry Smartphone Simulator uses an existing SD Card data file as the
SD Card.
Use PC filesystem for SD Card files Specify that the BlackBerry Smartphone Simulator uses a directory on the computers hard
drive as the SD Card.
PC filesystem path for SD Card files Specify the root directory location of the SD Card file that the BlackBerry Smartphone
Simulator uses. The BlackBerry Smartphone Simulator uses this location when the "Use PC
filesystem for SD Card files" option is set. The default path is working directory/sdcard).
31
BlackBerry JDE Plug-in for Eclipse online help
Task Steps
To erase all files. > Select Erase All.
To erase files that represent SD Card data. > Select Do not save flash data on simulator exit.
To erase system non-volatile storage data > Select Reset NVRAM on startup.
when the BlackBerry Device Simulator
starts.
To erase file system data when the > Select Reset the filesystem on startup.
BlackBerry Device Simulator starts.
Task Steps
To erase file system data. > On the BlackBerry menu, click Erase Simulator File > Erase File System.
To erase system non-volatile storage data. > On the BlackBerry menu, click Erase Simulator File > Erase Non-volatile Storage.
To erase files that represent SD Card data. > On the BlackBerry menu, click Erase Simulator File > Erase Removable Memory.
32
1: BlackBerry JDE Plug-in for Eclipse
Option Description
Command Line Specify the command line options for starting the BlackBerry Smartphone Simulator.
Working Directory Specify the directory that the BlackBerry Smartphone Simulator writes files to. The BlackBerry
Smartphone Simulator writes files such as flash memory files and SD Card files to this
directory.
User application Specify the path to the Jvm.dll file.
Do not simulate using an authentic Specify that the BlackBerry Smartphone Simulator identifies the battery as a third-party
BlackBerry battery battery.
Do not use PC numpad as trackball Specify that the BlackBerry Smartphone Simulator does not use the PC numeric keypad to
simulate the trackball.
33
BlackBerry JDE Plug-in for Eclipse online help
Parameter Description
port Specify aBlackBerry smartphone PIN if the BlackBerry smartphone connects to a USB port. You must also specify
the usb option.
password This parameter specifies the password for the BlackBerry smartphone, if a password for the BlackBerry
smartphone is set.
file This parameter specifies one or more .cod files to load onto the BlackBerry smartphone.
Start the BlackBerry MDS Simulator when you start the BlackBerry Smartphone Simulator
1. On the Run menu, click Debug Configurations or Run Configurations.
2. Perform one of the following tasks:
• To work with an existing start configuration, under BlackBerry Simulator, select a start configuration.
• To work with a new start configuration, right-click BlackBerry Simulator, select New.
3. Click the Simulator tab.
4. Click the General tab.
5. Select the Launch Mobile Data System Connection Service (MDS-CS) with simulator option.
6. Click OK.
34
1: BlackBerry JDE Plug-in for Eclipse
1. On the Window menu, click Preferences > BlackBerry JDE > MDS Simulator.
2. Click Browse.
3. Navigate to the BlackBerry MDS Simulator installation directory.
4. Select the MDS folder.
5. Click OK.
Open a web site in the BlackBerry browser when the BlackBerry Smartphone
Simulator starts
The following steps require the BlackBerry® MDS simulator. To obtain the BlackBerry MDS simulator, download
the BlackBerry Email and MDS Services Simulator package from the BlackBerry developer site: http://
na.blackberry.com/eng/developers.
1. On the Run menu, click Debug Configurations or Run Configurations.
2. Perform one of the following tasks:
• To work with an existing start configuration, under BlackBerry Simulator, select a start configuration.
• To work with a new start configuration, right-click BlackBerry Simulator, select New.
3. Click the Simulator tab.
4. Click the General tab.
5. Select the Launch Mobile Data System Connection Service (MDS-CS) with simulator option.
6. In the Launch app or URL on startup field, typing the web site URL.
7. Click OK.
35
BlackBerry JDE Plug-in for Eclipse online help
• To work with a new start configuration, right-click BlackBerry Simulator, select New.
10. Click the Simulator tab.
11. Click the General tab.
12. In the Launch app or URL on startup field, type the name of the .cod file of the application.
13. Click OK.
36
1: BlackBerry JDE Plug-in for Eclipse
Related resources
For more information about RIM APIs, see the API Reference for the BlackBerry® Java Development Environment.
For more information about how to create and test applications for the BlackBerry smartphone, including
technical updates, FAQs, and developer discussion forums, visit www.na.blackberry.com/eng/developers/.
37
BlackBerry JDE Plug-in for Eclipse online help
38
©2008 Research In Motion Limited
Published in Canada.