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(); } } }