stubs are not needed or are not generated when> = 5.0 jvms. Perhaps some of the paths are wrong, in the manual it is not very clear how to configure directories / paths and where you start the material.
The following worked for me:
~ / tmp $ mkdir -p hello / example
~ / tmp $ vim hello / example / Hello.java [copy / paste the code of Hello.java here]
~ / tmp $ vim hello / example / Server.java [copy / paste the code of Server.java here]
~ / tmp $ vim hello / example / Client.java [copy / paste the code of Client.java here]
~ / tmp $ mkdir build
~ / tmp $ javac -d build / hello / example / *. java
~/tmp$ rmiregistry &
~/tmp$ java -classpath build -Djava.rmi.server.codebase=file:build/ example.hello.Server &
Server ready
~/tmp$ java -classpath build example.hello.Client
response: Hello, world!
- , , , -Djava.rmi.server.codebase.