"cannot find symbol" error while compiling the RMI
843793Sep 14 2007 — edited Sep 17 2007I am trying to implement a simple RMI.
I have the following :
1. HelloInterface which has the SayHello method defined.
2. HelloImpl which has the implementation of Say Hello
3. Server code
4. Client code
the HelloInterface compiles properly.
but when i say javac HelloImpl
package rmisample;
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
import java.rmi.RemoteException;
public class HelloImpl extends UnicastRemoteObject implements HelloInterface{ --> this is where i get the error
/** Creates a new instance of HelloImpl */
public HelloImpl()throws RemoteException {
super();
}
public String SayHello(String s) throws RemoteException
{
return "hello" +s;
}
}
I get the following error:
C:\Myjava\RMISample\src\rmisample>javac HelloImpl.java
HelloImpl.java:18: cannot find symbol
symbol: class HelloInterface
public class HelloImpl extends UnicastRemoteObject implements HelloInterface{
All 4 files are in the same directory.
Am not sure what is going wrong and am new to this.
Edited by: topcatin on Sep 14, 2007 6:52 AM