| The build environment |
|
| Instructions for collecting and installing the proper tools for building these examples. |
Here's a list of the things you'll need to build and run these examples.
| Name | Description | ||
|---|---|---|---|
| Java(TM) 2 Platform Standard Edition | Jini(TM) network technology runs on the Java Platform. Specifically, the new Jini Technology Starter Kit (starter kit) v2.0 release requires version 1.4.1 or later of the Java(TM) 2 Platform Standard Edition [J2SE(TM)]. |
Get the software>>> |
|
| Jini(TM) Technology Starter Kit | These examples are built to work with both v1.2.1 and v2.0 of the starter kit. |
Get the software>>> |
|
| Apache Ant |
Apache Ant is a platform independent build tool written in the Java Programming Language,
with build scripts (like Makefile files for make) that
use an ASCII/XML form. Common tasks such as compling, creating JAR files, copying
files, etc. have associated Ant tasks. The class files, JAR files, API
documentation generated by the Javadoc(TM) tool, and other build activities in
these examples are all orchestrated through Ant and Ant add-ons.
Note: Ant is only required if you wish to (re)build the examples. |
Get the software>>> |
|
| ClassDepAndJar task | Apache Ant provides a means of adding user-defined Ant tasks. This is such a task. The ClassDepAndJar task is used to pull together JAR files based on a set of dependencies. It is essentially a wrapper for the ClassDep tool bundled with the starter kit. A version of ClassDepAndJar is bundled with the examples. No "installation" is necessary. | Included with these examples. | |
There are several things that need to be installed in order to use or build these examples, and those items are enumerated above. The following notes cover the UNIX(TM) and Microsoft Windows operating environments.
This section will discuss what must be done to run the examples on a typical UNIX platform. For example, these examples should run successfully on
The scripts that start Jini technology-enabled services (Jini services) and applications (Jini applications) are Bourne shell scripts, which generally run well on any UNIX system. Note that there will always be things that must be adjusted from system to system (host names, etc.). Please review the scripts before running them.
The general steps for preparing a computer for running these examples are:
/files directory as
/files/jini1_2_1/files/jini2_0jsk-policy.jar into the ext directory
inside the J2SE distribution. This is also recommended in the
Jini technology installation instructions.
This JAR file provides the means for dynamic policy
grants for security mechanisms introduced in v2.0 of the starter kit. For more information on
this, please review the v2.0 release notes.
This section will discuss what must be done to run the examples on a typical Microsoft Windows platform.
The files that start Jini services and Jini applications are Windows batch files, which generally run well on any Windows system. Note that there will always be things that must be adjusted from system to system (host names, etc.). Please review the scripts before running them.
The general steps for preparing a computer for running these examples are:
/files directory as
c:\files\jini1_2_1c:\files\jini2_0jsk-policy.jar into the ext directory
inside the J2SE distribution. This is also recommended in the
Jini technology installation instructions.
This JAR file provides the means for dynamic policy
grants for security mechanisms introduced in v2.0 of the starter kit. For more information on
this, please review the v2.0 release notes.
The build mechanism for these examples is Apache Ant. Ant build scripts
are named build.xml. These scripts are surprisingly flexible
and, as described above, largely platform independent. There are two
additional steps beyond those described in the section Running the examples on UNIX
that need to be performed in order to have an environment that can build these examples.
/files directory
alongside the starter kit directories. There are some environment variables
that must be set correctly for Ant to work.
JAVA_PATH and JAVA_HOME environment variables
must be set to point to the place where J2SE is installed.
ANT_HOME environment variable must be set to point to the
directory where Ant is installed.
bin directory within the Ant distribution should be added
to the path variable.
tools.jar file bundled with
the starter kit. The tools.jar can be mentioned within the
CLASSPATH environment variable (assuming the tools.jar
file is located in the /files/jini2_0/lib directory) in a definition
such as:
setenv CLASSPATH /files/jini2_0/lib/tools.jar
CLASSPATH environment variable,
append the path to the tools.jar to the end of the existing
CLASSPATH.
The build mechanism for these examples is Apache Ant. Ant build scripts
are named build.xml. These scripts are surprisingly flexible
and, as described above, largely platform independent. There are two
additional steps beyond those described in the section Running the examples on Microsoft
Windows that need to be performed in order to have an environment that can build
these examples.
c:\files directory
alongside the starter kit directories. There are some environment variables
that must be set correctly for Ant to work.
JAVA_PATH and JAVA_HOME environment variables
must be set to point to the place where J2SE is installed.
ANT_HOME environment variable must be set to point to the
directory where Ant is installed.
bin directory within the Ant distribution should be added
to the path variable.
tools.jar file bundled with
the starter kit. The tools.jar can be mentioned within the
CLASSPATH environment variable (assuming the tools.jar
file is located in the c:\files\jini2_0\lib directory) in a definition
such as:
set CLASSPATH=c:\files\jini2_0\lib\tools.jar
CLASSPATH environment variable,
append the path to the tools.jar to the end of the existing
CLASSPATH.
There is a great deal to learn from the examples bundled within this distribution. It is recommended that you study the examples, as they are, before making changes to them (or even rebuilding them).