Skip to main content


Posted by gonzo on February 11, 2005 at 3:44 AM PST

Running MyJXTA is relatively trivial, either via WebStart or source. While WebStart totally rocks I encourage folks to try building and running from source. I'll get to why in a bit.

MyJXTA runs, by default, on the "Public JXTA Network," affectionately called the "PubNet." This is basically an massive sandbox with which JXTA developers can deploy their wares and the JXTA curious can scratch their itch. A forum of sorts.

More frequently we've been asked "How can you run MyJXTA in a private network" to which this entry should shed a bit of light. The reasons vary but I believe the principal motivation behind this question is to to fundamentally expose colleagues and management, potentially skpetics, to the wonders of JXTA yet run it within a safe and well known environment. Being all for "enlarging the pie" here's a short little recipe on how to go about deploying MyJXTA on a "private network."

At this point in time, you will need to get the source. Go ahead. Don't be shy. 2 Ant commands and you will be ready to bake.

In order to change MyJXTA's default PubNet behaviour one must, today, edit 2 configuration files:

  • src/net/jxta/myjxta/resources/myjxta.xml
  • src/net/jxta/myjxta/resources/profile.xml

myjxta.xml is the principal MyJXTA configuration file whereas profile.xml is the JXTA Configuration Extention, aka ext:config, configuration file. More on the later at another time.

Firstly, myjxta.xml. All that needs to be added to this file is the "private network" deployment data, that being:

  • id
  • name
  • description

note: name and description are optional but for usability reasons you should include meaningful values

Now, all that needs to be done is add the aptly named attributes to the network data structure, as follows:

  <network id="urn:jxta:uuid-01234566789abcdef0123456789abcde02"
    name="My MyJXTA"
    description="JXTA Rules">

More information regarding JXTA's data structures, et al can be found in

Ok. That was pretty easy. What's next. Oh yeah, the profile.xml. This file describes the type of JXTA network environment the hosting application will bootstrap into. The first thing we'll need to modify is to specify an alternative bootstrap address, Boostraps are simply well known peers that are utilized to establish the intial network context. For this, we will assign a rendezvous and relay boostrap URI:

    <rendezvous bootstrap="file:///tmp/bootstrap.txt"
    <relays bootstrap="file:///tmp/bootstrap.txt"

The bootstrap can be any valid URI that lists seeding context JXTA peers. You can see the PubNet bootstraps here:

With that, all that remains is to disable multicasting. This is actually done by convention, mine, at present although another option is to simply change the multicast address. The included multicast address in the sample below is not valid. Sticking to convention for the moment, we simply need to disable multicast. To do so, we set the enabled attribute of the multicast descriptor to "false:"

        <multicast enabled="false">udp://</multicast>

That's it. Now all that remains is to place the cake into the oven and let it bake. Thusly, we turn to Ant:

  % ant run

At this point, you are running a private network deployment of MyJXTA! Not that painful and rather enabling in the overall scheme of things. That being, to actively infect those around you with the "connected network" vision that is JXTA. That we no longer have to put up with "static addressing." Free them. Free their minds. [flash matrix imagery]

Back to the source. The above, while k3w1, relatively painless and all it is not, well, all that intuitive for those that don't care about angle bracketed text, et al. One of the big "" items is "preferences" to which this and a multitude of other like features will be customer [I'm an xp fan ... people you care about and/or connect with are not users]. There is a wealth of preferences features that when appropriately exposed will truly put the My in MyJXTA. If you have an interest in helping to sling some MyJXTA prefernces code, don't be shy.

To close, I am soooooo loving my shiny new iPod. Golden! I'll explain my reasons for getting it at this time but my wife, who knows better, isn't buying it for a moment.

MyJXTA :: use it - learn it - do it

Java == platform independence

XML == application independence

JXTA == network independence

Secure End-to-End Computing

in my ears: Paul Oakenfold/Ibiza/Arena

Related Topics >>