Deploying Java Applications
Deploying Java Applications
Executive summary
This document provides information about how to distribute and install applications written in Java™ on
BlackBerry® devices and BlackBerry-enabled devices (BlackBerry Connect™ or BlackBerry Built-In™ devices),
and it directs you to the related development and administration resources that are available on
www.blackberry.com. The document describes the BlackBerry Internet Solution™ and the BlackBerry Enterprise
Solution™ and highlights the similarities and differences in the deployment of third-party applications in the two
solutions. Third-party applications are applications that Research In Motion (RIM) did not develop. They are
sometimes referred to as custom applications.
The document describes the following methods for deploying applications:
• BlackBerry Desktop Software (BlackBerry device connected to a user’s computer)
• BlackBerry Application Web Loader (BlackBerry device connected to a user’s computer)
• Standalone Application Loader, also referred to as Application Loader Lite (BlackBerry device connected to a
user’s computer)
• web browser (wireless download)
• Application Control policies (wireless push)
Audience
This document is intended for system administrators and application developers. It assumes that you have a
working knowledge of the following areas:
• BlackBerry Enterprise Server Version 4.0 or BlackBerry Internet Solution Version 2.0
• Java applications
If you have installed BlackBerry Enterprise Server Version 4.1, visit www.blackberry.com/knowledgecenterpublic/
to read the BlackBerry Enterprise Server System Administration Guide for information about application
distribution and installation.
BlackBerry solutions
The BlackBerry Internet Solution and the BlackBerry Enterprise Solution have been designed to address the
increasingly diverse needs of mobile professionals in a variety of work environments.
Application deployment
The BlackBerry solutions provide several options for deploying third-party applications. Some of these options
can be used to deploy applications on any BlackBerry device, while other options are exclusive to BlackBerry
devices that are part of the BlackBerry Enterprise Solution.
Deployment options
You have five options for deploying third-party applications on BlackBerry devices.
Usage
The BlackBerry Desktop Software is designed to present a familiar environment for users to download and install
new or updated applications on BlackBerry devices. This software can be used to install or upgrade both the
BlackBerry Device Software and third-party applications.
Prerequisites
Component Requirement
BlackBerry device or • able to run Java applications
BlackBerry-enabled
device
User’s computer • Microsoft Windows® 2000 or Microsoft Windows XP
• BlackBerry Desktop Software Version 4.0 or later
• RIM® USB drivers and USB connection for the BlackBerry device
Component Requirement
Application • .alx files and .cod files: The .alx file is an identifier for the application files.
A .cod file contains compiled and packaged application code. The Application
Loader requires both of these file types to install an application.
• optional modules: Some third-party applications require optional modules that
are part of the BlackBerry Device Software. In these cases, the required
modules are listed in the .alx file within a <requires> tag. If these required
modules are not preloaded on the BlackBerry device, you might need to install
the BlackBerry Device Software for the BlackBerry device on the user’s
computer. Visit www.blackberry.com/knowledgecenterpublic/ to read the
BlackBerry Application Developer Guide, Volume 1: Fundamentals for more
information about dependencies.
• installer: If you want the installer to update registry settings so that an
application displays automatically in the Application Loader in BlackBerry
Desktop Manager, visit the Technical Knowledge Center at
www.blackberry.com/knowledgecenterpublic/ to read article DB-00061, “How
to — Update the registry to deploy Java applications using Desktop Manager.”
Action Procedure
Make the application The administrator or application developer completes this action.
available to users.
1. Obtain the application installer from the application’s vendor, developer, or
wireless service provider.
Note: The installer is usually distributed as either an .exe file or a .zip file.
2. If the installer is a .zip file, unzip it.
3. Run the .exe file.
This action places the .alx identifier file and the .cod file in an installation
folder on the user’s computer.
Note: In an enterprise environment, you can perform several actions at this
point that can affect the distribution and behavior of the application. These
actions include the following:
• Index the application.
• Set a software configuration to include the application.
• Set an Application Control policy rule for the application.
See “Using the BlackBerry Enterprise Server and Application Control policy
rules” on page 14 for information about how to complete these tasks.
Install the application. Typically, the user completes this action, but an administrator in an enterprise
environment might complete it instead.
1. Connect the BlackBerry device to your computer.
2. In the BlackBerry Desktop Manager, open Application Loader.
3. In the Application Loader wizard, click Next.
4. Type your password, if prompted, and click Next.
5. In the Device Application Selection window, click Add.
6. Navigate to the folder of the program that you want to add.
Action Procedure
7. Click the .alx file for the program, and click Open.
8. After the application displays in the Application Name list, make sure that its
check box is selected, and click Next.
9. If the Device Backup window displays, select a backup option, and click Next.
10. Verify the information that displays in the Completing the Application Loader
Wizard window, and click Finish.
The application installs, and you are notified when the installation is complete.
11. Click Close.
Usage
The BlackBerry Application Web Loader is designed to facilitate the download and installation of new or updated
applications on to BlackBerry devices. You can host applications centrally on a company intranet or public web
server, making it easy to post application updates for BlackBerry device users to download.
Users connect their BlackBerry devices to a computer with the RIM USB drivers installed and a USB connection,
visit the hosted web site, and load applications on to their BlackBerry devices. They do not require the BlackBerry
Desktop Software.
Prerequisites
Component Requirement
BlackBerry device or • able to run Java applications
BlackBerry-enabled Notes: Users do not require the BlackBerry Desktop Software to download and
device install the .cod files.
You cannot use the BlackBerry Application Web Loader to install applications from a
web page to a BlackBerry Connect device that was manufactured or distributed by a
third party.
Component Requirement
User’s computer • Microsoft Windows 2000 or Microsoft Windows XP
• Microsoft Internet Explorer Version 5.0 or later (users must use Microsoft
Internet Explorer to access the web site with the BlackBerry Application Web
Loader)
• Microsoft ActiveX Version 8.0 or later
• BlackBerry Application Web Loader (if the Application Web Loader is not
present, it is loaded as the first step in the installation)
• RIM USB drivers and USB connection for the BlackBerry device
Web server Configure the following Multipurpose Internet Mail Extensions (MIME) types on the
web server to enable the download and installation of Java applications on
BlackBerry devices:
• .cod files: application/vnd.rim.cod
• .jad files: text/vnd.sun.j2me.app-descriptor
Application • scripting language: Use any language that works with Microsoft Internet
Explorer and Microsoft ActiveX.
• AxLoader.cab file: Place this file in the same folder as the web page .html files
(or update the <object> element URL information in the .html file to the new
location).
• .jad files and .cod files: The .jad file is the application descriptor that provides
information about the application and the location of .cod files. A .cod file
contains compiled and packaged application code. Both of these file types are
required to install an application.
• maximum .jad file size: The maximum file size is 4096 bytes.
• maximum number of .cod files: The maximum number of .cod files is 12.
• MIDlet support: The BlackBerry Application Web Loader supports Connected
Limited Device Configuration (CLDC) applications that reference the
BlackBerry application programming interface (BlackBerry API) or MIDlets that
have been converted to the .cod file format.
• installer: If you want the installer to update registry settings so that an
application displays automatically in the Application Loader, visit the Technical
Knowledge Center at www.blackberry.com/knowledgecenterpublic/ to read
article DB-00061.
Action Procedure
Enable the BlackBerry The administrator or application developer completes this action.
Application Web
Loader on a web 1. Create a web page for application distribution.
server. 2. Create or obtain the .jad and .cod files for the application.
3. Place the AxLoader.cab file in the same folder as the web page’s .html files.
4. Place the application .jad and .cod files on the web server that hosts the web
page.
5. Reference a specific version of the BlackBerry Application Web Loader.
6. Associate the BlackBerry Application Web Loader with the application .jad file.
7. To load the .jad file, invoke the application web loader loadJad() method.
Use a string parameter that represents one of the following:
• .jad file is in the same location as the AxLoader.cab file: Use the .jad
filename.
• .jad file is in a different location from the AxLoader.cab file: Use the
relative location address of the .jad file.
8. Distribute the web page link to users.
Note: The BlackBerry Application Web Loader requires the user password on the
BlackBerry device before installing an application. If a password is set, the
AxLoaderPassword control is used to obtain the device password. This control is
included in the AxLoader.cab file. See the BlackBerry Application Web Loader
Developer Guide for more information about how to obtain a device password.
Usage
To use the standalone Application Loader, you create a shared folder or network drive. In this shared location,
you place the applications that you want to deploy and then index the applications. You then provide users with
a link to the shared location.
Prerequisites
Component Requirement
BlackBerry device or • able to run Java applications
BlackBerry-enabled
device
User’s computer • Microsoft® Windows® 2000 or Microsoft Windows XP
• RIM USB drivers and USB connection, or a serial connection (for serial devices)
• BlackBerry Desktop Software Version 4.0 (or BlackBerry Device Manager
Version 4.1 for automated installation)
Application • .alx file and .cod files: The .alx file is an identifier file for the application files.
A .cod file contains compiled and packaged application code. The Application
Loader requires both of these file types to install an application.
• optional modules: Some third-party applications are dependent on optional
modules that are part of the BlackBerry Device Software. In these cases, the
required modules are listed in the .alx file within a <requires> tag. If these
required modules are not preloaded on the BlackBerry device, then you might
need to install the BlackBerry Device Software for the specific device model on
the local computer. Visit www.blackberry.com/knowledgecenterpublic/ to read
the BlackBerry Application Developer Guide, Volume 1: Fundamentals for more
information about dependencies.
• required applications: To set an application as required on a user’s BlackBerry
device, complete the following actions:
• Open the .alx file.
• Locate the copyright statement. For example, <copyright>Copyright 1998-
2006 Research In Motion</copyright>.
• Add the following tag: <required>true</required>.
Each application that the .alx file references is now required in the Application
Loader.
Action Procedure
Add the application The administrator or application developer completes these actions.
files to a shared folder.
1. Create or obtain the .alx and .cod files for the application.
2. Create a uniquely named folder for the application, maintaining
the application’s file structure, in a shared network location:
<drive:>\Program Files\Common Files\Research In
Motion\Shared\Applications\.
3. Copy the .cod, .alx, and .dll files to the unique folder.
Index the application ¾ See “Using the BlackBerry Enterprise Server and Application Control policy
rules” on page 14 for information about how to index an application.
Action Procedure
Share the application 1. Navigate to the application’s folder.
folder.
2. Right-click the folder, and then click Properties.
3. Click the Sharing tab.
4. Select Share this folder. Provide read-only permissions.
5. Set any other required options, and then click OK.
Set a software ¾ This action is optional. Set a software configuration if you want the Handheld
configuration. Configuration Tool (for Microsoft Exchange) or the BlackBerry Manager (for
IBM Lotus Domino or Novell GroupWise) to monitor or track whether users
install an application on their BlackBerry devices. See “Using the BlackBerry
Enterprise Server and Application Control policy rules” on page 14 for
information about how to set a software configuration.
Distribute a link to the ¾ Using your preferred distribution method (for example, a link in a message
application. or a link on an intranet web page), provide users with a URL link to the
loader.exe file. For example, \\<shared computer name>\Research In
Motion\Apploader\loader.exe.
Action Procedure
Deploy the application ¾ The actions required to deploy an application in automated mode are identical
in automated mode. to the actions using the Application Loader described on page 11, with the
following exception.
When you distribute the application link, specify the loading command based
on the type of connection (USB or serial) that the BlackBerry device uses, as
shown in the following examples:
• USB: \\<shared computer name>\Research In
Motion\Apploader\loader.exe /defaultUSB /forceload
• Serial: \\<shared computer name>\Research In
Motion\Apploader\loader.exe
Usage
Wireless application download using a web browser on the BlackBerry device is designed to provide a flexible
way for users to install new applications without a connection to another computer.
Prerequisites
Component Requirement
BlackBerry device • able to run Java applications
Web server Configure the following MIME types on the web server to allow the download and
installation of Java applications on BlackBerry devices:
• .cod files: application/vnd.rim.cod
• .jad files: text/vnd.sun.j2me.app-descriptor
• .jar files (optional): application/java-archive
Application The following file types are required to install an application:
• .jad file: The .jad file is the application descriptor that provides information
about the application and the location of the application’s .cod or .jar files.
• .cod or .jar files: These files contain compiled and packaged application code.
Action Procedure
Install the application The administrator or application developer completes these actions.
on the web server.
1. Create a web page for application distribution.
2. Create or obtain the .jad and .cod or .jar files for the application.
3. Place the .jad and .cod or .jar files on the web server.
Send the application’s ¾ Using your preferred distribution method (for example, a link in a message or a
link to users. link on an intranet web page), provide users with a URL link to the .jad file.
Action Procedure
Install the application Typically, the user completes this action.
on a BlackBerry
device. 1. Open a browser on the BlackBerry device.
2. Click Download. Using the URL specified in the .jad file, the BlackBerry device
begins downloading the application .cod or .jar files using HTTP.
3. After verifying that there is sufficient space on the BlackBerry device, the
BlackBerry device installs the application and presents a notification message
at completion.
Using the BlackBerry Enterprise Server and Application Control policy rules
Application Control policy rules are designed to provide you with the ability to centrally manage the
third-party applications that are present on BlackBerry devices and to control the privileges associated
with each application. For example, you can specify an application’s operating environment, require or
exclude applications, and set policies for API usage, internal data access, and external connections. You can
also audit or remotely administer applications.
To deploy an application from the BlackBerry Enterprise Server using Application Control policy rules, you
provide the .alx and .cod files for the application on a shared network drive. You create a software configuration
to send the application wirelessly to each user account that is assigned the Application Control policy rule within
the software configuration.
Visit www.blackberry.com/knowledgecenterpublic/ to read the BlackBerry Enterprise Server Handheld
Management Guide for your platform for more information about how to use Application Control policy rules.
Usage
Application Control policy rules work with BlackBerry devices that can connect to a BlackBerry Enterprise Server.
When you set an Application Control policy rule, you can install third-party applications without user
intervention. This helps to make sure that the mobile professionals in your organization always have access to
the most complete and up-to-date applications.
Prerequisites
Component Requirement
BlackBerry device • able to run Java applications
• BlackBerry Device Software Version 4.0 and later
BlackBerry Enterprise • BlackBerry Enterprise Server software Version 3.0 or later
Server
Application The following files are installed on the shared network drive:
• .alx file and .cod files: The .alx file is an identifier file for the application files.
A .cod file contains compiled and packaged application code. The Application
Loader requires both of these file types to install an application.
• optional modules: Some third-party applications depend on optional modules
that are part of the BlackBerry Device Software. In these cases, the required
modules are listed in the .alx file within a <requires> tag. If these required
modules are not preloaded on the BlackBerry device, then you might need to
install the BlackBerry Device Software for the specific device model on the
local computer.
Visit www.blackberry.com/knowledgecenterpublic/ to read the BlackBerry
Application Developer Guide, Volume 1: Fundamentals for more information
about dependencies.
Application deployment using the BlackBerry Enterprise Server and Application Control
policy rules
In the BlackBerry Enterprise Solution environment, perform the following actions to deploy a Java application
using the BlackBerry Enterprise Server and Application Control policy rules.
Note: Allow four hours for application deployment on multiple BlackBerry devices.
Action Procedure
Add the application The administrator or application developer completes these actions.
files to a shared folder.
1. Create or obtain the .alx and .cod files for the application.
2. Create a uniquely named folder, maintaining the application’s file structure, in
the network location that hosts your shared applications:
<drive:>\Program Files\Common Files\Research In
Motion\Shared\Applications\.
3. Copy the .alx, .cod, and .dll files to the unique folder.
Configure a required This action is optional. The administrator or application developer completes the
application. action for a third-party application that is required on the BlackBerry device. When
an application is configured as “required,” users cannot remove it from their
BlackBerry devices.
1. Open the .alx file.
2. In the <application> element, type <required>true</required>.
3. Save the .alx file.
Index the application. The Application Loader reads the list of installed software in the software index and
uses the index to locate the applications to install.
1. At the command prompt, type cd <drive:>\Program Files\Common
Files\Research In Motion\Apploader.
2. Type loader.exe /index. The Application Loader builds the software index
structure and adds any missing index files.
Note: If you modify an .alx file after you create a software index, re-index the
applications.
• At the command prompt, type cd <drive:>\Program Files\Common
Files\Research In Motion\Apploader.
• Type loader.exe /reindex.
Share the application Software configurations must be able to access the application through a Universal
folder. Naming Convention (UNC) path to the shared network drive.
1. Navigate to the application’s folder.
2. Right-click the folder, and then click Properties.
3. Click the Sharing tab.
4. Select Share this folder. Provide read-only permissions.
5. Set any other required options, and then click OK.
Action Procedure
Guide for your platform. The BlackBerry Enterprise Server Policy Reference Guide
provides information about setting IT policy rules.
For Microsoft Exchange
1. In the Handheld Configuration Tool, right-click the name of the BlackBerry
Enterprise Server.
2. Click IT Policy.
3. Click New.
4. Type a policy name.
5. From the Policy rule list, add policy rules to the IT policy.
6. Click OK.
For IBM Lotus Domino and Novell GroupWise
1. In the BlackBerry Manager, in the left pane, click BlackBerry Domain.
2. On the Global tab, click Edit Properties.
3. Click IT Policy.
4. In the IT Policy Administration section, double-click IT Policies.
5. Click New.
6. Double-click IT Policy Name.
7. Type a name for the new policy.
8. Configure the policy rules by performing the following actions:
• In the left pane, click a policy group.
• In the right pane, double-click the rule to assign a value or to choose
between True and False.
9. Click OK.
Action Procedure
4. In the IT Policy Administration section, double-click IT Policy to User
Mapping.
5. In the left pane, click a user.
6. In the right pane, click an IT policy.
7. Repeat steps 5 and 6 to move additional users to the IT policy.
8. Click OK.
Set a software This action is optional. Complete the step if you want the Handheld Configuration
configuration. Tool (for Microsoft Exchange) or the BlackBerry Manager (for IBM Lotus Domino or
Novell GroupWise) to monitor or track whether users install an application on their
BlackBerry devices.
1. In the Handheld Configuration Tool (Microsoft Exchange) or in the BlackBerry
Manager (IBM Lotus Domino or Novell GroupWise), in the left pane, click
Software Configurations.
2. Click Add New Configuration.
3. In the Configuration Name field, type a name.
4. In the Configuration Description field, type a description.
5. To define the application’s location, click Change, and then specify the
location. For example, \\<shared computer name>\Research In Motion\.
6. Click OK.
7. In the Application Name list, select the check box beside each BlackBerry
device series that you are configuring.
8. Select the check box for each application that you are installing.
9. Click Policies to define Application Control policy rules for the application.
From the Policy list, select an Application Control policy rule for the
third-party application.
10. Click OK.
Action Procedure
Set an Application This action is required if you create an Application Control policy rule and are not
Control policy rule. using one of the default policies.
Visit www.blackberry.com/knowledgecenterpublic/ to read the BlackBerry
Enterprise Server Handheld Management Guide for your platform for more
information about Application Control policy rule options.
1. In the Handheld Configuration Tool (Microsoft Exchange) or in the BlackBerry
Manager (IBM Lotus Domino or Novell GroupWise), in the left pane, click
Software Configurations.
2. Click Manage Application Policies.
3. Click New.
4. Type a new policy name.
5. Customize the properties for the Application Control policy rules.
6. Click OK.
Assign an Application This step is optional. Assign an Application Control policy rule if you want to
Control policy rule to manage an application after it is installed.
an application.
1. In the Handheld Configuration Tool (Microsoft Exchange) or in the BlackBerry
Manager (IBM Lotus Domino or Novell GroupWise), in the left pane, click
Software Configurations.
2. Click Manage Application Policies.
3. In the Policy column, specify the policy to assign to the application.
• To assign an Application Control policy rule to all applications that are not
already assigned to an Application Control policy rule, click a policy rule at
the application software level.
• To assign an Application Control policy rule at the application software
level, click <default>. An asterisk is added to the policy name.
• To assign the default Application Control policy rules that are
preconfigured on the BlackBerry device, click <none>.
4. Click OK. When you assign a new Application Control policy rule, the
BlackBerry Enterprise Server automatically sends the policy to the specified
BlackBerry devices.
Send the application 1. In the Handheld Configuration Tool (Microsoft Exchange) or in the BlackBerry
to the BlackBerry Manager (IBM Lotus Domino or Novell GroupWise), click Software
device over the Configurations.
wireless network.
2. In the Configuration Name list, click a software configuration.
3. Click Edit Configuration.
4. Expand the application, and then select the check boxes beside the
applications to push over the wireless network.
5. From the Delivery list, select Wireless.
6. Click OK.
Related resources
Resource Description
BlackBerry Application Web Loader Developer • installation of applications from a web page
Guide
• AxLoader.cab controls
• BlackBerry Application Web Loader web page template
BlackBerry Enterprise Server System • IT policy rules
Administration Guide
• selection of a network drive
BlackBerry Enterprise Server Handheld • third-party application controls
Management Guide
• IT policy rules for third-party applications
• Application Control policy rules
• installation and configuration of third-party
applications on a BlackBerry device
BlackBerry Enterprise Server Policy Reference • IT policy rules for third-party applications
Guide
• access to enterprise applications
BlackBerry Java Development Environment Volume 1: Fundamentals
Application Developer Guide • BlackBerry Integrated Development Environment
• third-party application development, packaging,
distribution, and installation
• integration of enterprise applications
Volume 2: Advanced Topics
• BlackBerry device applications
• BlackBerry Browser integration
• data storage and backup
BlackBerry MIDlet Developer Guide • design and creation of MIDlets for BlackBerry devices
• BlackBerry and MIDP APIs
Managing Wireless Data Transport in the • Part 1: Understanding TCP and HTTP transport options
BlackBerry Solution Version 4.0 for Java applications for BlackBerry
• Part 2: Alternative Transport Options for Java
applications for BlackBerry
www.blackberry.com/knowledgecenterpublic/ • BlackBerry technical documentation
• DB-00019: What Is — An .alx file
• DB-00055: How to — Compile a MIDlet into a COD file
• DB-00061: How to — Update the registry to deploy
Java applications using Desktop Manager
www.blackberry.com/developers/ • BlackBerry Developer Zone
• BlackBerry device documentation
• developer support
• application development tools for the BlackBerry device