> I have an issue with Eclipse not adding a static Class called
> _mthclass$ to my compiled class file and when I compile the same
[quoted text clipped - 3 lines]
> Serialization. Has anyone come across a way to get Eclipse to add this
> class or a work around?
Eclipse does indeed have its own compiler that is an independent
implementation of the spec. This means that bugs in Sun's implementation may
not necessarily appear in Eclipse and vice versa, as
https://bugs.eclipse.org/bugs/show_bug.cgi?id=37565 illustrates (Sun's Javac
was triggering a class initialization upon encountering a class literal,
whereas the spec says it shouldn't; Eclipse compiler was following the spec
which caused errors in code that relied on buggy Sun implementation).
One workaround is to make sure you use same compiler on both ends. If you
decide to use Sun's javac, you need to use Ant within Eclipse (right-click on
build.xml in Package Explorer and select Run Ant) which will use javac from
whatever J2SE SDK you have currently selected. Selecting Project -> Build
Project/All in the menu will use the internal Eclipse compiler.
- --
Emir Alikadic
Software Developer
CollectiveBid Systems Inc.
"If you think technology can solve your problems, then you don't understand
your problems and you don't understand technology." [Bruce Schneier]