karan malhi wrote:
+1.
I didnt quite understand as to why is it an undocumented compiler
feature? The standard javac compiler does have a "target" option ,
which is probably what eclipse would be using to generate the class
files for 1.4 target vm.
It is the "jsr14" part of the option that is undocumented rather than
the "-target". If you use the standard "-target 1.4", the compiler will
give you an error message and will not compile your source. You have to
use "-target jsr14" to be able to compile 5.0 source into 1.4 bytecode.
Tim Ellison wrote:
As discussed on the list, there is a compiler option in the 5.0
compilers we use that allows source code containing a subset of Java 5.0
language features to be compiled into 1.4 compatible class files.
Since this is quite a significant change I'd like to get a vote on
whether the project should make this compiler option a necessity for our
code.
The positive outcome of this is that we can develop APIs that rely on
those 5.0 language features, and run the resulting code on existing
1.4-compatible VMs.
The downside is that we are using an undocumented compiler feature on
the reference implementation (it is supported on the Eclipse compiler).
[ ] +1 - Yes, change the build scripts to compile 5.0 code to 1.4 target
[ ] 0 - I don't care
[ ] -1 - No, don't change the compiler options (please state why)
Regards,
Tim
--
Oliver Deakin
IBM United Kingdom Limited