RFR: 8210839 Improve interaction between source launcher and classpath
Jonathan Gibbons
jonathan.gibbons at oracle.com
Thu Sep 20 18:18:41 UTC 2018
Please review a medium-small change to the source launcher, so that
classes defined
in the source file are used in preference to the same or similar classes
on the classpath.
There is no perfect solution here. Various solutions were considered.
The decision was
made in favor of least surprise for simple and relatively simple use,
which is the original
target for the feature. So, yes, it is possible to write some programs
that can be run
with the source launcher that do not behave the same as if they were
compiled and run
the "traditional" way, but such examples are generally beyond the
intended use of the
feature.
The solution that is proposed is to modify the internal class loader so
that the set of
classes (or resources) defined in the source file are checked before
checking the
application class path.
A side-effect of the change is that the obscure/annoying error message
class found on application class path: {0}
is no longer required.
The changes to CLTest.java are white-space only.
Email:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-September/055437.html
Email:
http://mail.openjdk.java.net/pipermail/compiler-dev/2018-September/012427.html
JBS: https://bugs.openjdk.java.net/browse/JDK-8210839
Webrev: http://cr.openjdk.java.net/~jjg/8210839/webrev.00/index.html
-- Jon
More information about the compiler-dev
mailing list