Here is how we generate that XML netlet descriptor. A netlet descriptor simply says what JARs a netlet needs to run, where its start point is and any parameters it needs. The one parameter it does need is an XML warrant. We can download this from http://www.jtrix.org/warrant/hello-warrant.xml and we'll save it into a file called hello-warrant.xml.
To create the netlet descriptor we need to say what type of XML file we're generating (a netlet descriptor), what the main class is, what JARs are needed and what directories hold them, the parameter (the warrant) for start-up, and what we the resulting XML file to be called:
% ls hello-warrant.xml hello1.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-warrant.xml} % ls hello-warrant.xml hello1-client.xml hello1.jar %
You might need to change the Jtrix binaries directory for your system. In the end we have the netlet descriptor hello1-client.xml.
Now we can run the netlet with Jnode as shown above.
As a final comment, some people have found problems with this example
if they are working from behind a fussy firewall, and if so then all
such examples will exhibit the same problems. The current solutions
are (1) to run such examples from a location without such a firewall,
or (2) jump to the examples in Chapters ,
and
which are
local only, and do not require external connections. Also, look on
http://www.jtrix.org which will have some discussion on this
issue.
Nik Silver 2002-03-09