This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes Running RMI applications Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "Running RMI applications" Watch "Running RMI applications" New topic
Author

Running RMI applications

david mao
Greenhorn

Joined: Nov 29, 2004
Posts: 3
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

Joined: Nov 29, 2004
Posts: 3
I figured out.

I need to
set classpath=d:\rmi\rmi\lab
before executing rmiregistry and CalculatorServer.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Running RMI applications
 
Similar Threads
RMI Learning
RemoteException
RMI problem
RMI problem
UnMarshalException - Nested ClassNotFoundException again