Tried to run ServiceServerImpl.class with rmic and got this error. Below is the command prompt text pasting.
"C:\Program Files\Java\jdk1.7.0_21\bin>rmic.exe ServiceServerImpl
error: File .\ServiceServerImpl.class does not contain type ServiceServerImpl as
expected, but type serviceserver.ServiceServerImpl. Please remove the file, or
make sure it appears in the correct subdirectory of the class path.
error: Class ServiceServerImpl not found.
2 errors "
Here is the source code of the class file. Using Windows 8. I copied the .class file to the rmic.exe 's location later. didn't work either way. It is in a package called "serviceserver"
package serviceserver;
import java.rmi.*;
import java.rmi.server.*;
import java.util.*;
public class ServiceServerImpl extends UnicastRemoteObject implements ServiceServer
{
HashMap serviceList;
@Override
public Object[] getServiceList() throws RemoteException
{
System.out.println("in remote");
return serviceList.keySet().toArray();
}
public ServiceServerImpl() throws RemoteException
{
setUpServices();
}
thanks
Update : didn't paste the whole source code here. Stuff is missing form the bottom.