// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package rmi.server;

import java.rmi.AccessException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.server.UnicastRemoteObject;

public class Server {
    private static final int REGISTRY_PORT = 1099; 
    private static final String NAME = "Test";
    private static final int SERVER_PORT = 12345;
    public static void main(String[] args) throws AccessException, RemoteException {
        LocateRegistry.createRegistry(REGISTRY_PORT).rebind(NAME, UnicastRemoteObject.exportObject(new TestImpl(), SERVER_PORT));
    }
}
