Allow specification of an alternate javac location.

Review Request #4124 - Created July 26, 2016 and submitted

Benjy Weinberger
stuhood, zundel

Currently we always use the javac embedded in the JDK Zinc runs on.

This change supports experimenting with unreleased compiler versions
without having to use an unreleased, and possibly unstable, runtime.

Specifically, this allows running the (relatively stable but still unreleased)
javac 9 compiler on a Java 8 runtime, something that Bazel currently supports.

Note that this change also removes the explicit adding of tools.jar to the classpath,
since Zinc does this anyway (via if
it doesn't find a compiler on the bootclasspath.

Note also that this does not support introducing alternate entry points
(such as would be required to use errorprone). The entry point must still
be All this change does is allow that
class to be loaded from somewhere outside the JDK's tools.jar.

Supporting alternate entry points will require changing how Zinc locates
the JavaCompiler implementation it uses. As mentioned above, it currently
delegates to, which locates But it would be pretty easy to add
a flag to zinc that names some other implementer of JavaCompiler to load.

This change also:
- Removes a comment that was obsoleted long ago, in b15a7cbb to be precise.

- Fixes a couple of references to a non-public member of a base class.

CI passes:

Eric Ayers
Stu Hood
Benjy Weinberger
Benjy Weinberger
Review request changed

Status: Closed (submitted)

Change Summary: