Hello,
Swing Suite users have contacted me regarding
strange errors messages they experienced with
Skeleton Pro in the Swing Suite 1.5 Beta and RC.
These problems were due to Eclipse compiler bugs,
wrong Eclipse project/global setups, and problems
with incompatible classes in extension directories.
ECLIPSE COMPILER BUGS
If you are using Eclipse to compile JGoodies apps
with Java 1.5 as target environment, I *strongly*
recommend to update at least to Eclipse 3.1.2.
For a list of the many 1.5 compiler bugs see here:
http://tinyurl.com/nx9wo
I personally work with the Eclipse 3.2M5; for me
it works as good as the latest stable version 3.1.2.
But I use only a few third-party plugins, all which
are available for the 3.2 stream.
ECLIPSE COMPILATION SETTINGS
If compile against the Java 1.5 core library,
you should configure the compiler target to 1.5
(JDK compliance level in Eclipse). Otherwise Eclipse
may generate code that throws NPEs at locations
where you won't expect an NPE, for example in a line:
if (aField == null) { return };
If you get NPEs like that, please check, if you
can run the precompiled Swing Suite examples in
your environment. If so, have a look at the compilation
setup, compiler target and core library version.
JAVA EXTENSION DIRECTORIES
Last but not least, use the Java extension directory
mechanism judicously. If you put a JAR file in such
an extension directory, the JAR's classes will be
added to the classpath after the core classes but
before all custom classes. Hence an old class in
the extension directory will override a newer version
that is in your application JAR. Incompatible JARs
may lead to class loading problems, such as
ClassNotFoundException, MissingFieldException, etc.
The other way round, you can safely add JARs
to the extension directory, if you can ensure
that no application JAR contains a modified
version of that JAR. But in most cases it is
easier to add a library JAR to the custom classpath.
In most Java runtime environments, there's only
a single Extension Directory: <jre-home>/lib/ext/
Hope this helps.
Best regards,
Karsten Lentzsch
P.S.: If no show stoppers come up, I'll turn
the Swing Suite 1.5 RC into the final this Friday.