[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Java 5.0 and com.sun packages

Oliver Ruebenacker wrote:
>   I am using Eclipse on Fedora 10, trying to work on a project that is
> restricted to Java 1.5. The only Java 1.5 I could find on the Fedora
> repository was GCJ. Now, I see some errors on Eclipse related to
> imports that start with "com.sun", that can not be found (e.g.
> com.sun.imageio.plugins.jpeg.JPEGImageWriter,
> com.sun.java.swing.plaf.windows.WindowsDesktopManager).
>   Is there anything on the Fedora repositories that fixes the problem,
> perhaps even a different Java? Do I need Sun's Java to work on this
> project? Or something else from Sun?

Try using OpenJDK (which is a 1.6) and setting the source and target
language to 1.5.

That said, programs using com.sun classes are broken, those classes are NOT
part of the Java API and may NOT be present even on certified Java
implementations. I think OpenJDK has the JPEG stuff now (reimplemented, as
the original implementation was licensed from a third party and thus not
part of the OpenJDK release - the kind of things you have to expect if you
use private APIs). But com.sun.java.swing.plaf.windows.* will obviously not
be available in ANY JVM for non-Window$ OSes, not even the binaries from
Sun. The software needs to be fixed not to use Window$-only APIs.

        Kevin Kofler

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]