Dne Wednesday 19 December 2007 15:21:25 Anssi Hannula napsal(a):
> >>> What impact does this have on external packages that will not run with
> >>> iced-tea?
> >>
> >> This should not have impact on those.
> >
> > Sorry, I didn't explain myself properly. It appears from this post that
> > there is a plan to make iced-tea the default java in the distribution.
>
> Default java used for *building* packages. The run-time environment is
> discussed in a separate thread ("Java for 2008.1"), but I don't think
> we'll be switching the mandriva commercial distros from sun java for
> 2008.1.
I am afraid you are asking for troubles. icedtea (based on openjdk) is Java 7,
while commercial alternative is Java 6. I am not sure if the APIs in Open JDK
already differ from Java 6, but I am pretty sure they will one day. At that
time you may compile fine, but not execute on Java 6 then. And this may
happen even if your source code is compilable on Java 6. This is what
happened to NetBeans few years ago:
StringBuffer s1 = new StringBuffer();
StringBuffer s2 = new StringBuffer();
s2.append(s1);
compiles fine on JDK 1.3 as well as JDK 1.4, but if you compile on JDK 1.4, it
does not run on JDK 1.3. Why? Because new method append(StringBuffer sb) was
added to that class in JDK1.4.
The sad thing is that you do not find out unless you execute that line of
code. That is why I do not recommend compiling against rt.jar from newer
version and running the result on older one for production use.
-jst