Running JXTA Applications

To compile this example, you need to add JXTA files to your classpath as we discussed in Chapter 2. Then you can simply compile the HelloWorld class:

piccolo% javac HelloWorld.java

The application is started as we might expect:

piccolo% java HelloWorld

As we mentioned, the first time you run the platform from a particular directory, the configurator will pop up and ask you to configure the network environment. Subsequent invocations of the application will require you to enter the secure username and password that you entered into the configurator when you first ran the program. Once you’ve run the configurator and/or entered the correct username and password, the platform starts booting, and the following message is printed:

Started Hello World

If you examine the directory in which the program was run, you’ll discover that the .jxta directory contains the platform configuration file (PlatformConfig), the peergroup cache directory (cm), and the username directory (pse).

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.