PART - Pervasive Applications RunTime


This page describes how to install the PART source code distribution and compile PART for various target platforms.


Installing PART source code distributions

Get the latest source code distribution from the PART download page and unpack the file contents to a directory of your choice. This will create a directory tree with a root directory named partVersion, where Version is the PART version number, e.g., 1.2. In the text describing how to compile the sources below we have assumed that the PART version is 1.2 and that the top directory name thus is part1.2.


Compiling PART from the command line

PART is compiled using Ant. If you don't have Ant installed on your machine, you can download it from ant.apache.org.

The source code distribution of PART includes an Ant build file which is used to compile PART for various target platforms. This file is called build.xml and is located in the part1.2/java directory.

Open a shell and change directory to the part1.2/java directory. For instance:

>cd part1.2/java

By typing ant at the command prompt and then pressing Return, you should see a list of available Ant targets:

>ant
Buildfile: build.xml

list_targets:
     [echo] ant j2se_jar -------> Build jar file for J2SE platforms.
                                  Will create 'dist/j2se/part_j2se.jar'.

     [echo] ant j2me_jar -------> Build jar file for J2ME platforms.
                                  Will create 'dist/j2me/part_j2me.jar'.

....

If Ant has not been installed, or is not accessible from the command line path, an error message similar to the one below will be printed:

'ant' is not recognized as an internal or external command, operable program or batch file.

The following sections will describe how to compile PART for various target platforms.  

Compiling J2SE targets

As all PART targets, the J2SE targets are compiled using Ant from the command line. Apart from Ant, it is also required that you have a Standard Edition Java Development Kit (JDK) installed on your computer. During testing, PART has been compiled using JDK SE 1.4, 5 and 6.

There are three different Ant targets for the J2SE platform.  These targets are listed in the table below.

Target name Description Source and binary files
j2se_jar Compiles the PART jar for J2SE
  • Source code files are located in sub-directories of part1.2/java/src/all and part1.2/java/src/j2se
  • Compiled class files will end up in part1.2/java/build/src/j2se/classes.
  • Will also create the file part-1.2-j2se.jar in part1.2/java/dist/j2se
j2se_test Compiles a number of sample applications for J2SE
  • Source code files are located in sub-directories of part1.2/java/src/test-j2se
  • Compiled class files will end up in part1.2/java/build/test/j2se/classes.
  • Will also create a number of sample application jar files in part1.2/java/dist/j2se/test. 
j2se_tools Compiles the  browser  tool for J2SE
  • Source code files are located in sub-directories of part1.2/java/src/tools-j2se
  • Compiled class files will end up in part1.2/java/build/tools/j2se/classes.
  • Will also create Browser.jar in part1.2/java/dist/j2se/tools.
 
To compile a specific target, type 'ant targetname' at the command prompt and press Enter. For instance:

>ant j2se_jar

Instructions on how to run compiled J2SE sample applications can be found here. This page described how to use the object browser tool.


Compiling J2ME targets

As all PART targets, the J2ME targets are compiled using Ant from the command line. Similar to the J2SE targets, J2ME compilation also requires a Java SE 1.4, 5, or 6 SDK installed on the local machine. However, there are some additional requirements:
  1. Apart from Ant, J2ME compilation also requires Antenna to work. The latest version of Antenna can be downloaded from antenna.sourceforge.net.  Place the Antenna jar (e.g., antenna-bin-1.0.0.jar) for instance in the lib directory of the Ant installation directory on your local machine.
  2. J2ME targets also requires a J2ME development toolkit to be installed on the local machine. This can for instance be the Wireless Toolkit (WTK) distributed by Sun (see java.sun.com) or a simitlar toolkit distributed by a phone manufaturer, for instance the Sony Ericsson SDK for the ME platform (see developer.sonyericsson.com).
  3. You also need to edit the value of the property wtk.home in the build.properties file (located in the part1.2/java directory). The value should be the path to the directory where the J2ME development toolkit (see 2 above) is installed. For instance, if the toolkit is installed in the directory c:\Programs\WTK25 (assuming you are using a Windows based machine), the line defining the wtk.home property in build.properties should look like this (note the double backslash):

    wtk.home=C:\\Programs\\WTK25
  4. In order to create the signed sample applications (see the j2me_test_sign target below), a key store containing a certificate supported by the target phone is needed. Certificates for code signing can be bought from various organisations, e.g., VeriSign or Thawte. The compilation also needs the keystore password and the keystore sign alias in order to work. This information can be supplied by setting the keystore.name, keystore.passwd and keystore.sign.alias properties in the build.properties file. For instance, if the key store file is placed in the part1.2/java directory and is named keystore, and the password and sign alias are my_passwd and my_alias, the lines in build.properties defining these properties should look like this:

    keystore.name=keystore
    keystore.passwd=my_passwd
    keystore.sign.alias=my_alias
The available PART J2ME targets are listed in the table below. 

Target name Description Source and binary files
j2me_jar Compiles the PART jar for J2ME
  • Source code files are located in sub-directories of part1.2/java/src/all and part1.2/java/src/j2me
  • Compiled class files will end up in part1.2/java/build/src/j2me/classes.
  • Will also create the file part-1.2-j2me.jar in part1.2/java/dist/j2me.
j2me_test Compiles a number of sample applications for J2ME
  • Source code files are located in sub-directories of part1.2/java/src/test-j2me
  • Compiled class files will end up in part1.2/java/build/test/j2me/classes.
  • Will also create a numer of sample application jar and jad files in part1.2/java/dist/j2me/test
j2me_test_sign Compiles a number of signed sample applications for J2ME
  • Source code files are located in sub-directories of part1.2/java/src/test-j2me
  • Compiled class files will end up in part1.2/java/build/test/j2me/classes.
  • Signed jar and jad files will end up in part1.2/java/dist/j2me/test, their names will include _signed, e.g., ConnectionClient_signed.jar and ConnectionClient_signed.jad.

To compile a specific target, type 'ant targetname' at the command prompt and press Enter. For instance:

>ant j2me_jar

Instructions on how to install and run compiled J2ME sample applications can be found here.


Compiling TINI targets

As all PART targets, TINI targets are compiled using Ant from the command line. Apart from Ant, it is also required that you have a Standard Edition Java Development Kit (JDK) installed on your computer. During testing, PART has been compiled using JDK SE 1.4, 5 and 6. You also need to download and install a TINI Software Development Kit (SDK) from Maxim Integrated Products, which is available here. During development, PART has been tested with TINI SDK version 1.16 and 1.17.

Once you have downloaded and installed the TINI SDK, you need to edit the build.properties file (located in the part1.2/java directory), and set the value of the tini.sdk.home property. The value should be the directory in which the TINI SDK is installed. For instance, if the installation directory is c:\Programs\tini1.17 (assuming you are using a Windows based machine), the line defining the tini.sdk.home property in build.properties should look like this (note the double backslash):

tini.sdk.home=C:\\Programs\\tini1.17

The available PART TINI targets are listed in the table below.

Target name Description Source and binary files
tini_jar Compiles the PART jar for TINI
  • Source code files are located in sub-directories of part1.2/java/src/all and part1.2/java/src/tini
  • Compiled class files will end up in part1.2/java/build/src/tini/classes.
  • Will also create the file part-1.2-tini.jar in part1.2/java/dist/tini.
tini_test Compiles a number of sample applications for TINI
  • Source code files are located in sub-directories of part1.2/java/src/test-tini
  • Compiled class files will end up in part1.2/java/build/test/tini/classes.
  • Will also create a number of sample application tini files in part1.2/java/dist/tini/test.

To compile a specific target, type 'ant targetname' at the command prompt and press Enter. For instance:

>ant tini_jar

Instructions on how to install and run compiled TINI sample applications can be found here.

Compiling SNAP targets

As all PART targets, SNAP targets are compiled using Ant from the command line. Apart from Ant, it is also required that you have a Standard Edition Java Development Kit (JDK) installed on your computer. During testing, PART has been compiled using JDK SE 1.4, 5 and 6. You also need to download and install a SNAP firmware distribution from Imsys Technologies. Information on how to do this can be found here. During development, PART has been tested with SNAP firmware version 1.0.6 and 1.0.8.

Once you have downloaded and installed the firmware distribution, you need to edit the build.properties file (located in the part1.2/java directory), and set the value of the snap.sdk.home property. The value should be the directory in which the SNAP firmware distribution is installed. For instance, if the installation directory is c:\Programs\snap1.0.8 (assuming you are using a Windows based machine), the line defining the snap.sdk.home property in build.properties should look like this (note the double backslash):

snap.sdk.home=C:\\Programs\\snap1.0.8

The available PART SNAP targets are listed in the table below.

Target name Description Source and binary files
snap_jar Compiles the PART jar for SNAP
  • Source code files are located in sub-directories of part1.2/java/src/all and part1.2/java/src/snap
  • Compiled class files will end up in part1.2/java/build/src/snap/classes.
  • Preverified class files will end up in part1.2/java/build/src/snap/preverified.
  • Will also create the file part-1.2-snap.jar in part1.2/java/dist/snap.
snap_test Compiles a number of sample applications for SNAP
  • Source code files are located in sub-directories of part1.2/java/src/test-snap
  • Compiled class files will end up in part1.2/java/build/test/snap/classes.
  • Preverified class files will end up in part1.2/java/build/test/snap/preverified.
  • Will also create a number of sample application jar files in part1.2/java/dist/snap/test.

To compile a specific target, type 'ant targetname' at the command prompt and press Enter. For instance:

>ant snap_jar

Instructions on how to install and run compiled SNAP sample applications can be found here.

gtheme by Chris M