•  "When java tries to deserialize an object, it compares the serialized object's serialVersionUID with that of the class the JVM  is using for deserializing the object. ...
    If the two numbers don't match, the JVM assumes the class is not compatible with the previously-serialized object, and you'll get an exception during deserialization.
    So, the solution is to put a serialVersionUID in your class, and then as the class evolves, the serialVersionUID will remain the same and the JVM will say, "Ok, cool, the class is compatible with this serialized object." even though the class has actually changes"

    If the class has been changed and you want the JVM to not to load the previously serialized classes then the serialVersionUID . Otherwise leave it alone.

  • 2005年05月20日

    mysql备份脚本

    Tag:MySQL DB

    FOR /F "tokens=1-4 DELIMS=/ " %%F IN ('date /T') DO (set v_date=%%F%%G%%H)
    FOR /F "tokens=1-4 DELIMS=: " %%F IN ('time /T') DO (set v_time=%%F%%G%%H)
    set fname=fireshort_%v_date%_%v_time%.sql
    echo %v_time%
    echo %fname%
    mysqldump.exe  fireshortdb > %fname%

    将上面的内容保存为backupfireshortdb.bat,执行时就可以得到fireshortdb的备份,形如fireshort_2005-05-20星期五_840.sql。

  • 2005年05月20日

    eclipse 3.1M7似有一大bug

    Tag:Java eclipse
            昨天下午在eclipse里面修改一些东西,然后发布到tomcat中,却总是没有效果。后来调试好久,才发现eclipse居然没有自动编译(我已经选上自动编译了)。后来又关闭project,更新project依赖的project,清除project,莫名其妙就好了。暂时也没有办法重现,不知道是不是3.1M7的bug,以前没有碰到过。
  • 2005年05月06日

    Appfuse video

    Tag:Java AppFuse

    Appfuse video:

    Watch:

    http://demo.appfuse.org/setup.html
    http://demo.appfuse.org/appgen.html

    Download:

    https://www.dev.java.net/files/documents/1397/14148/appfuse-videos.zip