Re: Q: target version (1.4, 1.5 or 1.6) for java-bytecode-format backward compatibility
On 2012-12-14 15:41, Hideki Yamane wrote:
Moving this to email@example.com.
> About "incompatible-java-bytecode-format with OpenJDK 7 as default-jdk" issue,
> I wonder which version should be specified to keep backward compatibility.
> I've found this is reported in LP#1049779.
> And I've investigated how should be fixed, and specifying target version
> is good way. But I cannot decide which version would be used.
> So, 1.4, 1.5 or 1.6?
Honestly, in practise either of version <= 1.6 will do. I think most of
us pick 1.5 out of habbit.
>> This is somewhat complicated by the fact that on kfreebsd we still don't have
>> openjdk, so we're using GCJ/GIJ, which is really a 1.5 implementation.
> If it's true, 1.5. If not, 1.6 IMO.
You would think that, but no. GCJ/GIJ is instructed to accept any known
major Java version and then croak if it sees a byte code it doesn't grok.
However, GCJ/GIJ does not (to my knowledge) have the full Java 1.6
(nor 1.7) library behind it, so the code will still crash due to missing
methods or classes. However, the bytecode "format" is not going to save
you from that. If we were to check that, we would have to use a JavaX
library when compiling in 1.X mode.
I am told that OpenJDK 7 has been ported to kFreeBSD and it is simply
stalled a buildd issue. If so, I'd rather see GCJ/GIJ being removed as
a "Java implementation". Anyway, this part is all "for Jessie", so ...
 E.g. default-jre would never use GCJ/GIJ and GCJ/GIJ should stop
providing javaX-runtime etc. Though, GCJ/GIJ will still remain as it is
used for bootstrapping OpenJDK.