serialVersionUID field warning issue

Hi all,

i'm using the jdk1.5.0 compiler in my java developement under Eclipse platform.

However i keep getting a strange warning on approximately each class in my applications:

The serializable class "MyClass" does not declare a static final serialVersionUID field of type long.

why i'm i getting this warning and what is it about ?

thanks.

[400 byte] By [Servant@AKa] at [2007-10-2 16:46:09]
# 1
I think Eclipse's default is to complain about this. To disable the warning, go to Window-Preferences-Java-Compiler-Errors/Warnings.Expand the "Potential programming problems" section on the right side of the dialog, and tell it to ignore "Serializable class without
Dick_Adamsa at 2007-7-13 17:56:34 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
or you can generate the serialversionuid field by serialver app: http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/serialver.htmlL.P.
lukika at 2007-7-13 17:56:34 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3

thanks for the two interesting replies : that solved the problem.

I need your further advice about warning issues :

i wrote an application in which i'm implementing dynamic java compilation using eclipse jdt package..

for warning settings i'm using :

String warningSetting = new String("allDeprecation,"

+ "assertIdentifier," + "charConcat,"

+ "conditionAssign," + "constructorName," + "deprecation,"

+ "fieldHiding," + "finalBound,"

+ "finally," + "indirectStatic," + "intfNonInherited,"

+ "localHiding," + "maskedCatchBlocks,"

+ "noEffectAssign," + "pkgDefaultMethod,"

+ "semicolon," + "specialParamHiding," + "staticReceiver,"

+ "syntheticAccess,"

+ "unnecessaryElse," + "uselessTypeCheck," + "unsafe,"

+ "unusedImport,"

+ "unusedThrown");

however the client is complainig that the warning level is too high...

what are the warnings from above list that are not very critical so i can remove them to reduce warning level ?

thank you.

Servant@AKa at 2007-7-13 17:56:34 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...