This page describes how to install the PART source code
distribution and compile PART for various target platforms.
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:
By typing ant at the command prompt and then pressing Return, you should see a list of available Ant targets:
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:
The following sections will describe how to compile PART for various target platforms.
There are three different Ant targets for the J2SE platform. These targets are listed in the table below.
To compile a specific target, type 'ant targetname' at the command prompt and press Enter. For instance:
Instructions on how to run compiled J2SE sample applications can be found here. This page described how to use the object browser tool.
To compile a specific target, type 'ant targetname' at the command prompt and press Enter. For instance:
Instructions on how to install and run compiled J2ME sample applications can be found here.
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):
To compile a specific target, type 'ant targetname' at the command prompt and press Enter. For instance:
Instructions on how to install and run compiled TINI sample applications can be found here.
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):
The available PART SNAP targets are listed in the table below.
To compile a specific target, type 'ant targetname' at the command prompt and press Enter. For instance:
Instructions on how to install and run compiled SNAP sample applications can be found here.
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 |
|
j2se_test | Compiles a number of sample applications for J2SE |
|
j2se_tools | Compiles the browser tool for J2SE |
|
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:- 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.
- 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).
- 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
- 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
Target name | Description | Source and binary files |
j2me_jar | Compiles the PART jar for J2ME |
|
j2me_test | Compiles a number of sample applications for J2ME |
|
j2me_test_sign | Compiles a number of signed sample applications for J2ME |
|
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 |
|
tini_test | Compiles a number of sample applications for TINI |
|
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 |
|
snap_test | Compiles a number of sample applications for SNAP |
|
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.