Sun Microsystems 2 Tablet Accessory User Manual


 
30 Signature Test Tool 2.0 User’s Guide April 2008
Running the Setup Command
1. At a command prompt, change to a current working directory of your choice
and note that all subsequent steps and commands are relative to this directory.
2. Using your favorite text editor, copy and paste the code from the test.java
file in
CODE EXAMPLE A-1 into a file with the same name under a new V1.0
subdirectory, with this as a result:
current-working-dir/V1.0/test.java
The example uses a compiled version of this file as a reference from which to
create the signature file.
3. Use the following command line to compile the test.java file into a target
class file:
% javac -d V1.0 V1.0/test.java
Where javac is a properly installed compiler that is compatible with the Java SE
platform.
This is the file that results from the command:
./V1.0/example/test.class
This class is used as the reference of comparison API in subsequent steps by
creating a test.sig file to represent it.
4. Create the test.sig signature file to represent class test by running the
following Setup command.
This command-line example assumes you set the CLASSPATH environment
variable to contain the
sigtestdev.jar and the JAVA_HOME variable is set to the
base directory of the Java runtime environment installation.
The command produces a console message similar to the following:
% java -cp V1.0:$CLASSPATH \
com.sun.tdk.signaturetest.Setup \
-classpath V1.0:$JAVA_HOME/jre/lib/rt.jar \
-static \
-apiVersion V1.0 \
-package example \
-FileName test.sig
Constant checking: on
Found in total: 12749 classes
Selected by -Package: 1 classes
Written to sigfile: 2 classes
STATUS:Passed.