Chapter 6. Jamaica Builder

Table of Contents
How the Builder tool works
Builder Usage
Builder Extended Usage
Cross Compiling Environments
Optimized for Embedded Systems

Traditionally, Java applications are stored in a set of Java class files. To run an application, these files are loaded by a virtual machine prior to their execution. This method of execution emphasizes the dynamic nature of Java applications and allows easy replacement or addition of classes to an existing system.

However, in the context of embedded systems, this approach has several disadvantages. An embedded system might not provide the necessary file system device and file system services. Instead, it is preferable to have all files relevant for an application in a single executable file, which may be stored in read only memory (ROM) within an embedded system.

The Builder provides a way to create a single application out of a set of class files and the Jamaica virtual machine.

How the Builder tool works

Figure 6-1 illustrates the process of building a Java application and the JamaicaVM into a single executable file. The Builder takes a set of Java class files as input and by default produces a portable C source file which is compiled with a native C compiler to create an object file for the target architecture. The build object file is then linked with the files of the JamaicaVM to create a single executable file that contains all the methods and data necessary to execute the Java program.

Figure 6-1. The Builder tool