Strumenti Utente

Strumenti Sito


lpr-b-2007-2008:mainbattitore
package astaRMI;
 
import java.rmi.*;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
 
public class ServerAsta {
 
	public static void main(String[] args) {
 
		Battitore b = null;
		try {
			b = new Battitore();
		} catch (RemoteException e2) {
			// TODO Auto-generated catch block
			e2.printStackTrace();
		}
		Registry reg = null; 
 
		try {
			reg = LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
		} catch (RemoteException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		try {
			reg.rebind("battitore", b);
		} catch (AccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
 
	}
 
}
lpr-b-2007-2008/mainbattitore.txt · Ultima modifica: 19/09/2008 alle 14:08 (16 anni fa) da 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki