Our warrant has a netlet descriptor embedded in it, so we'll create the descriptor first and then the warrant:
% ls
hello1.jar helloserver.jar
% jtrixmaker -type netlet -outfile hello-server.xml \
-jardirs . -jars helloserver.jar \
-classname org.jtrix.project.helloworld.HelloServer
% ls
hello-server.xml hello1.jar helloserver.jar
% jtrixmaker -type warrant -descriptor-in hello-server.xml \
-outfile hello-local-warrant.xml
% ls
hello-local-warrant.xml hello-server.xml hello1.jar helloserver.jar
%
The first call to jtrixmaker creates the descriptor for the netlet we've just written. We give it this information:
).
Notice that we put the warrant inside it as a parameter. So now we
must recreate it, this time using our new warrant as the parameter:
% ls
hello-local-warrant.xml hello-server.xml hello1.jar helloserver.jar
% jtrixmaker -type netlet -outfile hello1-client.xml \
-jardirs /usr/lib/jtrix . -jars libjtrix.jar hello1.jar \
-classname org.jtrix.project.helloworld.Hello1Client \
-param {warrant:hello-local-warrant.xml}
% ls
hello-local-warrant.xml hello1-client.xml helloserver.jar
hello-server.xml hello1.jar
%
In a future chapter (Chapter
) we'll
write a client netlet that reads in its warrant parameter from the
command line. But that's for later. For now, let's get on and run
our example.
Nik Silver 2002-03-09