Meaningless Drivel is fun!
The moose likes Distributed Java and the fly likes RMI: ClassNotFoundException: Impl_Stub Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI: ClassNotFoundException: Impl_Stub" Watch "RMI: ClassNotFoundException: Impl_Stub" New topic

RMI: ClassNotFoundException: Impl_Stub

Ilya PA

Joined: Sep 05, 2001
Posts: 15
THis is a very nasty problem that i'm having... Was looking through groups here and there the whole evening and already feeling sick of RMI. Please somebody help. The problem that i'm fighting here is following: I seem to be unable to bind the remoteInterfaceImlementation to the RMI registry. I'll describe in more detail what i was doing...
1)I run WinXP on my machine with J2SDK1.4.0
2)I've written a simple to the core RMI program, that has an Interface, InterfaceImplementation, RemoteClient and a RemoteServer, and stored it in the 'C:\RMIExample' folder
3)My actions to run it step by step, where specified above directory is set as the current one:
1.>javac *.java
2.>rmic InterfaceImplementation
6.>java -Djava.rmi.server.codebase=file:/C:\RMIExample/ RemoteServer
And this is the place where the nasty error pops up, saying:
java.lang.ClassNotFoundException: InterfaceImplementation_Stub
I had problems getting the explanation of the sun website(, They only mentioned a bit about it...

Thanks heaps for your time and help!
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
It looks like you don't have your classes in a package. If so, put them in a package and try again.
Naveen Sampra
Ranch Hand

Joined: Jun 11, 2003
Posts: 70
Could you explain how putting all classes in a package will help.

I have the exact same problem as explained in the first post above. I tried using package, but am continuing to get the annoying ClassNotFoundException.

Could someone please help.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Try changing your codebase property to -

it needs the three slashes between the protocol and the address, and you shouldn't mix forward- and back-slashes

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: RMI: ClassNotFoundException: Impl_Stub
jQuery in Action, 3rd edition