• Post Reply Bookmark Topic Watch Topic
  • New Topic

Running RMI applications  RSS feed

 
david mao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm learning RMI by following the article - Fundamentals of RMI by jGuru.

I coded the first sample - Calculator. It compiled without errors. I put all classes in the same directory.

When executing the server - java -classpath d:\rmi\rmi\lab CalculatorServer. I got the error -

C:\>java -classpath d:\rmi\rmi\lab CalculatorServer
Trouble: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: CalculatorImpl_Stub

C:\>

I verified that CalculatorImpl_Stub is in the directory.

What I'm missing?

Thanks.
 
david mao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured out.

I need to
set classpath=d:\rmi\rmi\lab
before executing rmiregistry and CalculatorServer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!