On Mon, Mar 22, 2010 at 2:27 PM, Rhett Sutphin
<[email protected]> wrote:
> I can't speak for Antoine, but I know I've run into problems where code
> compiled on a 1.5 JDK won't run on a 1.4 JRE, even though the source/target
> options are provided.  In the specific case I recall, there was change in
> BigDecimal such that if you compiled this code:
>
> new BigDecimal(4)
>
> against 1.5, it would throw a NoSuchMethodError when run on 1.4.  The
> problem was that 1.4 only had BigDecimal(double) while 1.5 has
> BigDecimal(int).
>
> Given the backwards-incompatible changes from 1.5 to 1.6 (e.g., in JDBC), I
> wouldn't be surprised if there are similar gotchas in that transition.

Sure, there's library issues like that. It's unfortunate that javac
doesn't do a better job of detecting that you're calling methods only
in a particular version. Perhaps they should introduce (should have
introduced) a @Version annotation so that javac could discount methods
and classes that are only available on particular versions of the JVM.

Anyway...I understand now why Antoine (and others) might need to build
with an older JDK. Though I don't understand supporting 1.4 :)

FWIW, JRuby does not support 1.4, though in theory it could be
retroweaved to do so. We've had almost no interest in that for a
couple years now.

- Charlie

Reply via email to