Roedy said:
in a similar way, you need to write -target 1.4 in Java 1.4.2 to make
assertions work. Otherwise they are treated as syntax errors.
True. I don't normally use the -target parameter at all (assertions ? who
needs assertions ?) because I tend to have a number of JVMs of different
vintages around, so it's much easier just to accept the
lowest-common-denominator default of javac. (And I don't let Eclipse compile
code for execution outside Eclipse -- if I use it at all.)
Actually it turns out that I was misreading my own dissassembler output,
the -target 1.5 doesn't seem to force the ea1.2 compiler to emit ldc <typename>
after all. It does make it emit stack maps, though. (And a right pain they
will be to decode -- if I decide to bother. Not *difficult*, just lots of
code, lots of small objects, for very little benefit to me).
-- chris