Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » [Eclipse 3.1 RC1+ VE 2.1 M1] Why do I get a "serializable class error" when my class doesn
[Eclipse 3.1 RC1+ VE 2.1 M1] Why do I get a "serializable class error" when my class doesn [message #205925] Sun, 05 June 2005 21:26 Go to next message
Eclipse UserFriend
Originally posted by: pretzel_n_g.hotmail.com

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.
Re: [Eclipse 3.1 RC1+ VE 2.1 M1] Why do I get a "serializable class error" when my class [message #205949 is a reply to message #205925] Sun, 05 June 2005 22:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pretzel_n_g.hotmail.com

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.
Re: [Eclipse 3.1 RC1+ VE 2.1 M1] Why do I get a "serializable class error" when my class [message #205978 is a reply to message #205949] Mon, 06 June 2005 09:29 Go to previous messageGo to next message
Eclipse UserFriend
PretzelX,
Super class (any) implement serializable.
You can suppress warning in preferences (window-preferences - java)

regards
PretzelX wrote:

> 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.
Re: [Eclipse 3.1 RC1+ VE 2.1 M1] Why do I get a "serializable class error" when my class [message #206070 is a reply to message #205949] Tue, 07 June 2005 08:59 Go to previous message
Eclipse UserFriend
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@hotmail.com> wrote in message
news:d80drg$95q$1@news.eclipse.org...
> 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.
Previous Topic:Comparing (with compare framework) two ASTs
Next Topic:Full Java 1.5 ASTParser
Goto Forum:
  


Current Time: Wed May 07 12:24:33 EDT 2025

Powered by FUDForum. Page generated in 0.30123 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top