Oracle Java SE Embedded: Developer's Guide

12 Deploy Embedded Applications

This chapter shows you how to package your application and copy it to the target device.

It contains the following sections.

Package Your Application on the Host with the jar Tool

Use the standard jar command to create a .jar file of the compiled application. See the Java SE jar tool documentation for UNIX and Windows

About Connecting to the Target Device

As noted in Host Development for a Target Device, there are many options for controlling the target and copying compiled applications to it. The setup details are target-specific, and cannot be described in this guide.

Compiling on the host and running on the target requires a way to copy compiled application files from host to target. There are many possibilities, including:

  • Writing to a storage device supported by both computers, such as an SD card or flash drive. Format the drive as FAT32 to eliminate file ownership/permission issues.

  • Remotely mounting the target's file system on the host with the Network File System (NFS) or Samba.

  • Committing compiled code from the host to a shared repository and updating the target from the repository.

  • Using remote commands from a host over a network, such as scp (secure copy).

The target must provide a way to initiate operating system commands, notably the java launcher. To accomplish this, you can do one of the following:

  • Connect a keyboard and display directly to the target.

  • Use ssh from a network-connected host to run commands on the target remotely.

    Using a network for communication enables the host and target to be geographically separated.

To provide a uniform environment for examples, this chapter assumes that your host can communicate with the target with the standard network commands scp and ssh. You need the IP address, user name, and password to connect the host to the target.

Copy the Application to the Target Device

Copy the .jar file from the host to the target with the scp command.

Next Steps

Launch the application on the target device. See Launch Embedded Applications.

Close Window

Table of Contents

Oracle Java SE Embedded: Developer's Guide

Expand | Collapse