Oracle Java SE Embedded: Developer's Guide

9 Deploy Your JRE to the Embedded Device

This chapter describes how to deploy a custom JRE to a target device.

It contains the following sections.

Moving the Custom JRE to the Target Device

To make a JRE image run on a target device, copy its files from the jrecreate destination (--dest) directory (see jrecreate Command Output) to the file system of the target device.

How you copy depends on the device and your environment. For example, you can use an SD card or a network connection.

Adapt the following steps to your environment (destDir is the jrecreate destination directory):

  1. Recursively copy destDir from the host to the device directory where you want the JRE installed. For example:

    $ scp -r /tmp/SmallJRE/* root@target:/opt/local/ejdk<version>/
  2. If necessary, update the device's PATH environment variable to include the bin/ directory of the JRE. For instance:

    $ PATH=$PATH:/opt/local/ejdk<version>/bin/
    $ export PATH

To launch applications on your deployed JRE, see Launch Embedded Applications.

Verifying Your Deployed JRE

To verify that the JRE is correctly deployed on the target device, run the java command with the -version option on the target. For example:

$ ssh root@target java -version

Your command output will display details such as build numbers and components.

If you need to debug your running application, you must use the -XX:+UsePerfData flag of the java command. In Oracle Java SE Embedded, this flag is turned off by default.

For more information about deploying and launching embedded applications, see Deploy Embedded Applications and Launch Embedded Applications.

Close Window

Table of Contents

Oracle Java SE Embedded: Developer's Guide

Expand | Collapse