Search code examples
javawindowseclipsecommand-linermi

How to run Java SE 6 with RMI commands on Windows with Eclipse


I have a Windows machine with Eclipse and I've been given the following instructions:

i) run

/usr/java/latest/bin/rmiregistry &

to enable RMI registration;

ii) run

java -classpath poi-3.7-20101029.jar: -Djava.rmi.server.hostname=127.0.0.1 >comp34120.ex2.Main &

to run the GUI of the platform;

iii) run

java -Djava.rmi.server.hostname=127.0.0.1 SimpleLeader &

to run the SimpleLeader.

And after these steps, you can play with the GUI to get some ideas of how the >platform works.

How can I run these commands on my machine?


Solution

  • & at the end is Linux for START.

    SET "PATH=C:\path\to\java6\bin;%PATH%"
    
    START rmiregistry
    
    START java -classpath poi-3.7-20101029.jar;. -Djava.rmi.server.hostname=127.0.0.1 comp34120.ex2.Main
    
    START java -Djava.rmi.server.hostname=127.0.0.1 SimpleLeader
    

    The first line is only needed if not there already, i.e. first in PATH.