> I want to implement rmi and get this error
>
[quoted text clipped - 17 lines]
> If i remove the throws java.rmi.RemoteException, the compiler tells me it
> should be thrown.
I'm guessing that these classes implement java.rmi.Remote, either
explicitly or in their base classes. RMI requires (if I remember right)
the throws java.rmi.RemoteException for a class implementing
java.rmi.Remote, so if it's in the base class, it will have to be in the
descendant class.
This is a little funny, because the usual rule is that if an exception
is thrown in the base class method, the subclass method can throw the
same exception, or any smaller set of exceptions (meaning a more
specific exception type), and this can include having no throws clause
at all in the subclass method.
Peter G
Daniel - 17 Jun 2005 08:17 GMT
Hello, yes the base class implements UnicastRemoteObject and the Interface
extends Remote,
But i dont know how to solve this, what should i change?
>> I want to implement rmi and get this error
>>
[quoted text clipped - 32 lines]
>
> Peter G
Peter J. Grey - 19 Jun 2005 03:42 GMT
> Hello, yes the base class implements UnicastRemoteObject and the Interface
> extends Remote,
> But i dont know how to solve this, what should i change?
It looks like you need
void getEnToonData() throw java.rmi.RemoteException
because if it's for RMI, then you would expect that a
java.rmi.RemoteException could come up.
Peter G