Unable to reference sun.*

Dalibor Topic dalibor.topic at googlemail.com
Sat May 10 08:26:59 PDT 2008

Brendon McLean schrieb:
> Hi,
> I've been developing an application on the Mac, but the target 
> audience will be cross platform.  I've just discovered that the 
> application doesn't compile on either Windows or Linux on Java 6.  The 
> compiler is complaining that one of the sun.* package I'm importing 
> doesn't exist.
You can't use sun-internal packages if your audience is cross-platform, 
because they may or may not be available in a given implementation. 
Using runtime-specific, internal packages can only really 'work' for the 
given (version of the) runtime you've written the code on, if at all.

dalibor topic

More information about the compiler-dev mailing list