public static void main (String[] args) {
RoomLight myServer;
LookupLocator lookup;
ServiceRegistrar registrar;
ServiceItem serviceItem;
try {
/* Set the security manager to allow the RMI class loader
to go to the codebase for classes that are not available
locally. */
System.setSecurityManager (new RMISecurityManager ());
/* Create the attributes (an array of entry objects) that describe this
server and use it to register this server with the lookup service.
JoinManager finds and registers with the lookup service */
Entry[] attr = new Entry[2];
attr[0] = new Name("Neon Light");
attr[1] = new ServiceInfo("Name", "Manufactor", "vendor","version","model","serial");
myServer = new RoomLightNeon ();
serviceItem = new ServiceItem(null, myServer, attr);
lookup = new LookupLocator ("jini://localhost");
registrar = lookup.getRegistrar();
registrar.register(serviceItem, Lease.FOREVER);