A RMI server which works fine without the stopServer functionality.
public class HelloServer extends UnicastRemoteObject implements HelloInterface { priv
You need to store the result of LocateRegistry.createRegistry(), and unexport that. At present you're trying to unexport a stub.
LocateRegistry.createRegistry(),