package novy;

import java.net.MalformedURLException;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Eigentlich ServerMain, der die Clients selber ausfuhrt
 */
public class Main {
    public static void main(String[] args) throws InterruptedException, RemoteException, MalformedURLException, NotBoundException {
        // create Produkt where are going to consume, produce
        Mensch ms = new Mensch(5, "Prvni");
        //Server connection
        Server server = new Server();
        // registrierung von entfernen objekten.
        Registry registry = LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
        registry.rebind("PKP", server);
        // Naming.rebind("Counter", myCounter);
        System.out.println("Server started");


        /*
        2 Prod + 1 Consumer
         */
        ExecutorService executorService = Executors.newFixedThreadPool(3);
        executorService.execute(new Cleint_Prod(ms, server));
        executorService.execute(new Cleint_Prod(ms, server));
        executorService.execute(new Client_Cons(server));
        executorService.shutdown();



    }
}

@@ -714,13 +714,13 @@
 ung 
-von e
+des E
 ntfe
@@ -732,16 +732,32 @@
 objekten
+ in RMI Registry
 .%0D%0A     

Update Main.java