rmi classpath issues

2006-04-04 10:56:28 PM
I have a very simple class that deviates a bit from the rmi example as
below and I have the classes directory and even the explicit
examples.hello directory in my command line classpath, but still I am
java.lang.ClassNotFoundException: examples.hello.HelloImpl_Server_Stub
that is indeed in the examples.hello directory and being built every
time by jb. How can it not find it? tia.
public static void main(String args[]) {
String serverName=null;
// Create and install a security manager
if (System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
System.out.println("installed custom RMISecurityManager?");
try {
HelloImpl_Server obj = new HelloImpl_Server();
// Bind this object instance to the name "HelloServer"
serverName = java.net.InetAddress.getLocalHost().getHostName();
System.out.println("serverName= "+serverName);
Naming.rebind("//"+serverName+"/HelloServer", obj);
System.out.println("HelloServer bound in registry");
catch (Exception e) {
System.out.println("HelloImpl err: " + e.getMessage());