On 20/05/2016 23:54, Uwe Schindler wrote:
:
$ javac Test.java
Test.java:1: error: package javax.xml.bind does not exist
import javax.xml.bind.DatatypeConverter;
^
Test.java:5: error: cannot find symbol
DatatypeConverter.parseBoolean("true");
^
symbol: variable DatatypeConverter
location: class Test
2 errors
Right, as expected.
$ javac -source 8 -target 8 Test.java
warning: [options] bootstrap class path not set in conjunction with -source 1.8
1 warning
So the question is how should javac behave with -source/-target when
-bootclasspath is not specified. This has always been a problematic
usage because it means javac compiling for the older edition of the Java
Language but with the APIs for the runtime that javac is running on. The
warning was added in JDK 7 to try to bring attention to the problematic
usage. I'm not sure if anything should change now to align it with the
policy for root modules. This may be something that Jon can comment on.
The right thing is of course to add -bootclasspath or just replace the
usage with `javac -release 8`.
-Alan