Documentation



Oracle Java SE Embedded: Developer's Guide

4 Install Oracle Java SE Embedded

This chapter describes how to unpack and set up an Oracle Java SE Embedded installation bundle and the contents of the unpacked directories on a host computer.

Tip:

For a quick overview of the process of installing Java SE Embedded on a host, creating a custom JRE with jrecreate, and moving the JRE to the target device, see Quick Start for Platform Developers.

The instructions in this chapter are for Linux hosts. Users of Windows hosts must make adjustments as is common when working with products that have a Unix background. Some examples:

  • File path and environment variable names must be adjusted.

  • The jrecreate command is a .bat file rather than the .sh file shown in examples.

  • 7-zip or an equivalent utility can be substituted for gunzip to unpack an Oracle Java SE Embedded bundle.

Note:

Oracle Java SE Embedded is a modular system that must be configured before launching. You must use the jrecreate command to select the runtime components (such as APIs and virtual machines) that are appropriate for the functional and performance needs of your devices and applications. See Your Choices When Creating a Custom JRE. For details about how to create an embedded JRE, see Create Your JRE with jrecreate.

This chapter contains the following topics:

Why Install on a Host Computer?

Oracle Java SE Embedded does not have a JRE that you can install on an embedded device out of the box. You must build a custom JRE with the jrecreate tool on a host computer, then copy the JRE to the embedded device.

Tip:

If you are an application developer and do not plan to create a custom JRE and install it on an embedded device yourself, you do not need to install Oracle Java SE Embedded on a host computer. Use a supported version of the Java Development Kit (JDK) to develop your applications on a host computer. See the chapters in Embedded Application Development.

This chapter contains information about installing Oracle Java SE Embedded on your host computer.

Once you have finished installing Oracle Java SE Embedded on your host computer, the next steps are:

Prerequisites for the Host Computer

Before installing Java SE Embedded on your host computer, it must meet the following conditions.

  • A supported version of the Java SE Development Kit (JDK) or the Java Runtime Environment (JRE) is installed.

  • The JDK or JRE directory is searched before any other Java installation on the host. You can use the PATH environment variable or another method, such as a symbolic link.

  • The JAVA_HOME environment variable names the same JDK or JRE directory.

  • You have downloaded an Oracle Java SE Embedded bundle that matches the target platform's hardware and operating system. Download the Oracle Java SE Embedded bundle from http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/index.html

    If you plan to develop for multiple target platform types, you need a corresponding bundle for each.

Install Java SE Embedded on the Host Computer

Oracle Java SE Embedded is bundled in a compressed tar file that, when uncompressed, creates a directory called ejdk<version>. Subdirectories contain the jrecreate command and the Oracle Java SE Embedded components.

Copy the bundle to a host directory of your choice (installDir), and set it up as follows:

  1. Extract:

    $ cd installDir 
    $ gunzip *.gz
    $ tar -xvf *.tar 
    
    List of unpacked files ... 
    
  2. Remove the tar file.

  3. Set the EJDK_HOME environment variable to installDir/ejdk<version>.

  4. Verify the installation by displaying the jrecreate command help:

    $ cd $EJDK_HOME
    $ bin/jrecreate.sh --help
    Usage: jrecreate --help
    
    Summary of jrecreate syntax ...  
    

Java SE Embedded Installed Directories

Extracting creates the directory installDir/ejdk<version>/, which contains the following subdirectories:

  • bin/

    Contains the jrecreate script that you use to create a custom JRE for the target.

  • doc/

    Reserved for possible future use.

  • lib/

    Contains the jrecreate command implementation.

  • target:

    The name of this target directory represents the operating system and CPU architecture of your embedded device. The directory contains the components that the jrecreate command uses to compose a custom JRE, as described in Create Your JRE with jrecreate.

Close Window

Table of Contents

Oracle Java SE Embedded: Developer's Guide

Expand | Collapse