So, the problem is I have some server code that will allow a Client to call functions on it using rmiregistry. It should be noted I'm running these commands on OS X terminal and I have two folders I'm working within:
RMI
- which will call the rmiregistry and
Server
- which has all my server code in it
So, I open one terminal and enter this:
rmiregistry -J-Djava.rmi.server.codebase=file:/Desktop/RMI/Server/ &
All is well, I get a port back.
I then login to the Server folder that contains my server code to run my calculatorserver
program.
Now I've been told to specify the codebase and the security policy:
java -Djava.rmi.server.codebase=file:/Desktop/RMI/Server/ -Djava.security.policy=server.policy calculatorserver
However, I keep on getting this same error:
Server Error: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: calculator
I know the only reason I'm getting this error is because the rmiregistry can't find the server object.
Some guidance would be appreciated