New to Java? We'll help you get started with our revised beginner's tutorial, or our free online textbook.

Get the latest Java books
h t t p : / /w w w . j a v a c o f f e e b r e a k . c o m /

Java Coffee Break


Learning Java

Author Profiles
Talk Java!

Using Java

Discuss Java

Looking for Java resources? Check out the Java Coffee Break directory!

Getting 'Jini' with it

Jini is a revolutionary new technology that promises to profoundly change the way in which we look at networking. Jini makes it possible for virtually any hardware device to be instantly accessible to clients on a network, without the need to install any new drivers or to change any configuration parameters. The vision of Jini is a networked world, where software and hardware services work together effortlessly. -- David Reilly

Jini has to be about the hottest new Java technology to be released in years. Imagine a world of plug-and-play networked devices, which can be installed and seamlessly integrated with your LAN simply by connecting them to your network. A laptop on the go can just plug into an unfamiliar network, and access the printer or Internet proxy server, without the need to install any drivers. Mixing Unix and Wintel devices? Not a worry. Jini promises to let them talk to each other.

That's the vision behind Jini. But that vision goes much further. Not only can hardware devices talk to one another, but also software services. In a Jini world, you won't care whether how a device works, or whether it is software or hardware based. An Internet based fax service will act as a fax, as will a hardware device. You'll just look for a fax service, without worrying how the service is implemented.

How does it all work?

In today's hardware and software environments, installing devices can be tough. If you're lucky enough, your computer will detect a new piece of hardware, you'll load drivers for it, and after several minutes of installation your device will work. Probably. But how do you share the device over the network? That requires much more effort, and help from a network administrator.

Jini promises to do away with all this, by providing an easier way to register services (either hardware or software) on a network. Jini is the glue that will bind a collection of different hardware, software, and operating systems together. Built on Java, and Sun's remote-method-invocation (RMI) technology, Jini is a powerful and effective mechanism for software to interact with services. There are several components to a Jini system, a subset of which is described below.

Lookup service

As anyone who is familiar with distributed systems will know, it is essential that there is some way to obtain a list of available services. Usually, a service must register with a central lookup server, and then un-register when the service is no longer available. This means your service must know the location of the lookup server, and must terminate cleanly so that it can un-register.

Of course, in an ideal world, this would be no problem. The lookup server would never change. Programs would never crash and leave old lookup service entries. In the real world, both these situations do occur, and cause problems. 

Jini solves this, by automatically finding available lookup services on the network. Services, when registering, receive a "lease" on their entry in a lookup service for a small period of time, and the "lease" must be renewed at regular intervals if the service is still available. This makes Jini systems self-healing; if either a lookup service or a device goes down, in time the Jini system will adapt and compensate for the loss.

Services register with a lookup service

The services : sharing hardware or software services on a network

Jini makes the process of sharing services on a network far simpler. Through clever use of remote method invocation and the lookup service, client software can select an available service without caring about how it is implemented, or where it is located. These details are transparent to the client, through the use of proxy objects.

Let's look at a simple scenario, to demonstrate how clients interact with services in a Jini system. If a client wants to use a fax, it can select from a list of available Fax services, provided by the lookup service.

Client asks for a list of Fax services

Once selected, one Fax instance acts just like another, so the client doesn't need to be aware of the implementation details. There's no need for installation of software, as the proxy object handles any translation between the Fax interface, and the actual Fax implementation.

How do you write Jini software?

Jini software is written in the Java programming language, and uses remote-method-invocation (RMI) as a transport mechanism. This means that Java developers who have done a little RMI before can easily migrate to Jini. Other than the basic concepts of the Jini system, there isn't much more to learn. You're using the language you're familiar with - Java.

Where do I start learning Jini programming?

The first place to start is with The Jini Specification, which provides an overview of Jini, and the specification that you'll need as a reference during development. This reference will be invaluable during development, and the overview will give you a good idea of how Jini works.

If you just want to start programming Jini clients and services, the best place to start is Core Jini. Core Jini is a comprehensive developer's guide to Jini programming. This is the type of book that most developers are familiar with - a programming guide rather than just a technical specification. There's real code, for clients and services, which is an excellent way to get started, and a model for further development. To my mind, Core Jini and The Jini Specification are an unbeatable combination when used together. 


Jini is an incredibly powerful new technology for sharing and using software and hardware services over a network. It solves many of the problems facing other distributed computing systems, and uses technology which Java programmers are already familiar with. The potential of Jini is vast, and developers should get up to speed with Jini as early as possible.

Jini is a registered trademark of Sun Microsystems.

Back to main

Copyright 1998, 1999, 2000 David Reilly

Privacy | Legal | Linking | Advertise!

Last updated: Monday, June 05, 2006