At 07:38 11/30/99 , Michael Sinz wrote:
>Also, I know of some problems with older versions of other Java compilers
>(such as Jikes) that produce different version IDs from what JavaC does.
>(This is a tricky problem - again it should not be an issue as you should
>you the same exact class file and not depend on recompiling)
just to be fair... Jikes is not an "older" compiler and
you will encounter this problem with any version of jikes,
or sj, or any other compiler than javac. The problem is that
the spec for just what is a serialVersion and how it should
be calculated is not well defined, and the definition that
is present *relies* on the internal structure of javac.
Using the serialver tool (which has the same algorithm as
javac) and hard coding the serial uid into the .java
will get you around this problem if you're dedicated to
using jikes (or sj, or ...) instead of javac (and who
wouldn't be ;) and have to inter-operate with the same
class, compiled by someone else on some other compiler.
But it's a dangerous hack to just apply this to ALL
serializable classes... overriding the serialver uid
should be a special case used in last ditch efforts.
(you *might* guess that I work with a project where this
is done too much, and that people are constantly being
burnt for it, and that I'm the RMI guy that gets called
in and blamed for the broken code... sigh... you would be
correct.)
cabbey at home dot net <*> http://members.home.net/cabbey
I want a binary interface to the brain!
Today's opto-mechanical digital interfaces are just too slow!
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]