void run() throws Exception { // Test functions by comparing the version string from javac against // a "golden" version generated automatically from the underlying JVM. // As such, it is only effective in testing the "standard" compiler, // and not any development version being tested via --patch-modules. // Check the version of the compiler being used, and let the test pass // automatically if it is a development version. Class<?> javacClass = com.sun.tools.javac.Main.class;
URL location = javacClass.getProtectionDomain().getCodeSource().getLocation(); if (!location.toString().equals("jrt:/jdk.compiler")) {
System.err.println("javac not found in system image: " + location);
System.err.println("rest of test skipped"); return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.