oreilly.comSafari Books Online.Conferences.
Articles Radar Books  

Learning the JXTA Shell

by Rael Dornfest

I want to talk about the implications for that marvelous aspect of the fundamental UNIX design: the pipe, and its ability to connect small independent programs so that they could collectively perform functions beyond the capability of any of them alone. What is the equivalent of the pipe in the age of the Web?
-- Tim O'Reilly, JavaOne Keynote: "The Network Really is the Computer."

The JXTA shell is a command-line interface to Sun's JXTA (pronounced "Juxta") peer-to-peer framework. Originally written as a debugging tool for developers, the JXTA Shell affords a ground-floor view of the JXTA environment, much like a traditional shell drops one into the thick of a *nix operating system.

The JXTA shell is a fine demonstration of some of the key features of the JXTA platform. The shell itself is nothing more than a framework for dynamically loading and binding commands (read: classes) to the JXTA underpinnings. This allows you, the user, to extend the shell to your heart's content. Who'll be the first to write alias and less ;-)

As we'll see in this article, inter-peer messages in JXTA are nothing more than XML documents, a fact that provides various interesting intersections with Web Services (via XML-RPC and SOAP), syndication (via RSS), Instant Messaging a la Jabber, and more.

This article is an introductory tour of the JXTA shell. We'll step through some of its simple commands and move to more interesting examples constructed from these core building blocks. (For an overview of the JXTA platform, see the accompanying article, The JXTA Position.)

Anyone familiar with command-line shells, whether DOS or *nix, will feel right at home in the JXTA shell. There are basic commands: man, cat, env, grep, more, and more. Commands can, of course, be sewed together using pipes to create compound commands: env | wc. Multiple commands on one line are separated by semicolons: clear ; whoami ; man man. All in all, aside from the fact that it's easy to forget that it's not a complete shell (see "Gotchas"), there are few surprises.


Related Articles:

JXTA Takes Its Position

JXTA Shell commands

The JuxtaNet

"Hello, JXTA!"

Joy Announces JXTA

More from the OpenP2P.com

First things first; we'll download, install and launch the JXTA shell.

  1. The JXTA Shell is freely downloadable from the Jxta.org site at http://download.jxta.org/easyinstall/. Installers are available for various platforms, as well as ZIP archives and CVS access.

    Note: At the time of this writing, Windows 2000 users may have trouble with the Windows installer launching and disappearing without doing much of anything, save perhaps hanging around in the background. If this happens, you may want to download the latest nightly build.

  2. Launch the JXTA shell by double-clicking on the jxta.exe icon in the shell subdirectory of wherever you put the installation.
    Launching the JXTA Shell JXTA Application Icon  
  3. The first time you run the shell, the JXTA Configurator dialog will appear. Leave the defaults as they are; all you need do is fill in a name for your peer (anything will do) in the Peer Name field and click the OK button to move on.
    The JXTA Configurator The JXTA Configurator  
  4. The JXTA shell window should appear and you're ready to go.
    The JXTA Shell The JXTA Shell  

    Note: I found a couple of bugs that can cause the shell not to launch. If, after closing the configurator, the shell does not appear momentarily, double-click the jxta.exe icon to relaunch. Windows 2000 users may find this makes no difference and will need to log out (not reboot, mind you) and log in again before continuing.

This article was written using version 0.9 (build 14e, 04-22-2001). For versioning, type version at the command-line.

Pages: 1, 2, 3, 4, 5

Next Pagearrow

P2P Weblogs

Richard Koman Richard Koman's Weblog
Supreme Court Decides Unanimously Against Grokster
Updating as we go. Supremes have ruled 9-0 in favor of the studios in MGM v Grokster. But does the decision have wider import? Is it a death knell for tech? It's starting to look like the answer is no. (Jun 27, 2005)

> More from O'Reilly Developer Weblogs

More Weblogs
FolderShare remote computer search: better privacy than Google Desktop? [Sid Steward]

Data Condoms: Solutions for Private, Remote Search Indexes [Sid Steward]

Behold! Google the darknet/p2p search engine! [Sid Steward]

Open Source & The Fallacy Of Composition [Spencer Critchley]