JXTA Application Configuration

The dialog box that we showed in Figure 2-1 should make a little more sense now. That box is called the JXTA configurator tool, and it’s a basic feature of the JXTA platform. All JXTA applications use this tool when they are first configured.

Configuration information is stored by this tool in the local directory. The configuration information also includes a local port number on which the JXTA application will listen. For that reason, you cannot run two instances of the shell (or any other application) on the same machine from the same directory. Instead, you must do the following:

  • Create a new directory in which to hold the configuration information (e.g., /files/JXTA_Demo/Shell.2).

  • Copy the shell.sh or shell.bat script into that directory.

  • cd to that directory.

  • Execute the startup script.

When this shell starts, you will again be presented with the configuration box from Figure 2-1. You’ll need to perform some advanced configuration in order for this second shell to run.

The configurator has four panels:

Basic

The basic panel of the configurator allows you to assign a name to your peer. Any string can be entered (we chose “Test Shell 1”): it can represent a person’s name, a hostname, or any other identifier. The name you enter is not guaranteed to be unique. No centralized naming service is used by the configurator; therefore, two peers may end up with the same name. This is okay, since the peer name is intended to be used only as a hint for ...

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.