0

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?

Community
  • 1
  • 1
Alex Petev
  • 501
  • 5
  • 19
  • ...by running them? I'm not sure I understand the question... – Makoto Apr 15 '20 at 15:09
  • you don't have to do all these. In eclipse first run your server program ( wait till the server start) , then run your client program. note: you don't need to start RMI registry manually. See this link https://stackoverflow.com/a/10447357/3852345 – dilly Apr 15 '20 at 15:17

1 Answers1

1

& 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.

Andreas
  • 154,647
  • 11
  • 152
  • 247
  • @dilly The `java` command doesn't return until the program ends, so `START` is needed to run them both. Edit rejected. – Andreas Apr 15 '20 at 15:28