Sample project using Java RMI messaging. Updated with more specific instructions to run the app. This program can act as a server or a client but not both. The program arguments are to determine that role.
mvn clean package
To run this program, three terminals are needed. Go to the project folder where the project is built.
Go to the folder of the project. Run the following comamnds:
export CLASSPATH=$CLASSPATH:target/greetings-rmi-1.0-SNAPSHOT-jar-with-dependencies.jar
rmiregistry
rmiregistry is a go between client server. It is a service broker that knows about the functions of the server. It helps connect client to the server to interact to exchange data.
java -cp target/greetings-rmi-1.0-SNAPSHOT-jar-with-dependencies.jar edu.harrisburgu.cisc525.app.Main server //student-VirtualBox/GreetingServer
java -cp target/greetings-rmi-1.0-SNAPSHOT-jar-with-dependencies.jar edu.harrisburgu.cisc525.app.Main client //student-VirtualBox/GreetingServer "Johnny B Good"