Open five terminals:
Update your $CLASSPATH env var to the path of connector-xxx.jar
** ADD current directory in your class path in every session**
rmiregistry -J-Djava.rmi.useLocalHostName=true -J-Djava.rmi.server.hostname=127.0.0.1
cd src/
java Server -cp ./mysql-connector-java-8.0.19.jar
cd src/
java Server2 -cp ./mysql-connector-java-8.0.19.jar
cd src/
java Client -cp ./mysql-connector-java-8.0.19.jar
cd src/
java Client2 -cp ./mysql-connector-java-8.0.19.jar