Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.rmi.ServerError !  RSS feed

xuen daan
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to java rmi. I am looking for help to explain a wired case I ran into. Here was what I was doing:
I have a public class "Book.class" stored at "c:\book\Book.class". Also I create a remote object at "c:\rmi\" in which a reference of Book class is used. (The Remote interface is under c:\rmi.). I compile the remote object in the following steps:
1. c:\rmi\>javac -classpath "c:\book;."
2. c:\rmi\>rmic -classpath "c:\book;." Rmitest
(Compiling seems works fine. All class and stub, skel are created.)
Then I start the rmiregistry, and try to run the Rmitest.class as "c:\rmi\>java -classpath "c:\book;." Rmitest". At the here, I can run the class, and always get error "java.rmi.ServerError: Error occurred in server thread; nested exception is: java.lang.NoClassDefFoundError: Book".
I think I have included "c:\book" in classpath. Book class should be found by program.
Did I miss something here? Thanks for any help.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!