Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0

Get PDF Book Print View

Document Information

Getting Started

Java ME Platform SDK Features

Using Sample Projects

Creating and Editing Projects

Viewing and Editing Project Properties

Running Projects in the Emulator

Searching the WURFL Device Database

Finding Files in the Multiple User Environment

Profiling Applications

Monitoring Network Traffic

Lightweight UI Toolkit

Security and MIDlet Signing

BD-J Support

Creating a Stubs for BD-J Platform Project

Compiling, Deploying, and Running a Stubs for BD-J Platform Project

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator

On-device Debugging

Command Line Reference


JSR Support

JSR 75: PDA Optional Packages

JSR 82: Bluetooth and OBEX Support

JSR 135: Mobile Media API Support

JSR 172: Web Services Support

JSR 177: Smart Card Security (SATSA)

JSR 179: Location API Support

JSRs 184, 226, and 239: Graphics Capabilities

JSR 205: Wireless Messaging API (WMA) Support

JSR 211: Content Handler API (CHAPI)

JSR 238: Mobile Internationalization API (MIA)

JSR 229: Payment API Support

JSR 256: Mobile Sensor API Support


Creating a Stubs for BD-J Platform Project

Follow these steps to create a BD-J Project.

  1. Select File > New Project, and choose CDC Application. Click Next.

  2. Set the project name, location, and Main class name and click Next.

  3. Select Platform. From the Java Platform menu, choose Stubs for BD-J Platform and click Finish.

    A simple BD-J hello World project is created.

  4. To set BD-J preferences and permissions, right-click on the project and choose Properties. In the Category area select Application Descriptor. Click the BD-J tab on the right.

    The properties in this window are used to create a Permission Request File (PRF). This is an XML file and its format is controlled by Blu-ray disc specifications. Typically permissions apply to signed applications. Unsigned applications are not allowed access.

    • Application ID is a required value. The default is generally acceptable. This value is a 16-bit hexadecimal string. The recommended range is 0x0000 to 0x3FFF for unsigned applications, and 0x4000 to 0x7FFF for signed applications.

    • Organization ID is a required value. The default is generally acceptable, but it can be changed. This value is a 32-bit hexadecimal string. The recommended range is 0x7FFF0001 to 0x7FFFFFFF.

    • The SDK uses the Service Access, User Settings and Preferences, and Network Permissions values to create a permissions file.

      • File Access - Allows a signed application to access persistent storage.

      • Lifecycle Control - Allows an application to control the lifecycle (stop, pause, or resume) of any application that it has launched. It cannot affect applications it has not launched.

      • Service Selection - Allows a signed application to select a new service (assuming other permissions also permit the selection).

      • User Settings and Preferences - Checking Read or Write requests permission for all preferences. The user preferences are: User Language, Parental Rating, DefaultFontSize, and Country Code. For example, check Read to enable Read permission for all preferences.

      • Network Permissions - Allows a signed application to specify the hosts and actions that receive the permissions.

      For example, enter connect = * to request permission for all hosts to connect. To open all permissions for all hosts, enter: connect, listen, resolve, accept = *

    • By default the deployment directory ${build.dir}/deploy is created in:

      C:\Documents and Settings\User\My Documents\JavaMESDKProjects\Application\build\deploy

      The deployment directory contains the JAR file.

    The PRF is stored in the JAR file in the same location as the Main class. It is given the name bluray.Main.perm, where Main is the name of the Main class. A PRF file might look like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <n:permissionrequestfile xmlns:n="urn:BDA:bdmv;PRF" orgid="56789abc" appid="00004001">
      <file value="true"></file>
      <applifecyclecontrol value="false"></applifecyclecontrol>
      <servicesel value="true"></servicesel>
      <userpreferences read="true" write="false"></userpreferences>
        <host action="connect, listen, resolve, accept"> * </host></n:permissionrequestfile>

The contents of the deployment directory can be run automatically if you specified a valid player when you created the External BD-J Platform.

See Compiling, Deploying, and Running a Stubs for BD-J Platform Project.