[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: [Eclipse 3.1 RC1+ VE 2.1 M1] Why do I get a "serializable class error" when my class doesn't implement serializable interface?

Or you can use Ctrl+1 to generate a SUID or suppress the warning by adding 
the annotation @SuppressWarnings("serializable").

Cheers

Tobias

"PretzelX" <pretzel_n_g@xxxxxxxxxxx> wrote in message 
news:d80drg$95q$1@xxxxxxxxxxxxxxxxxxx
> Looking at the JDK documentation, I see that the Component class does 
> implement the Serializable interface.  Silly me!  All the other IDEs I've 
> been used either haven't been smart enough or have been ignoring this 
> warning.
>
> Now I know...
>
> PretzelX wrote:
>> Hi,
>>
>> I've just updated Eclipse with all the latest, and now I'm getting an 
>> error:
>>
>> "The serializable class MyJFrame does not declare a static final 
>> serialVersionUID field of type long."
>>
>> Why do I get this error since the offending class doesn't implement the 
>> serializable interface?  It is just a 'visual class' (JFrame) created 
>> using the wizard?  Interestingly it builds and runs just fine.
>>
>> Thanks very much for your help.
>> PretzelX.