javac unzips class files from jars on class path into output directory

Doug Simon doug.simon at
Tue Mar 7 16:06:52 UTC 2017

To be able to develop Graal on JDK 9, we're using the `--release 8` javac option and providing jar files for API that is either not in 9 or is not exported in 9. Here is a simplified form of a javac command:

javac -cp -d bin/ --release 8 graal/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/*.java


dsimon at kurz-3 ~/h/graal-core> ls graal/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/*.java

I expect 2 class files to be written to bin/. However, I see a number of files from in bin:

dsimon at kurz-3 ~/h/graal-core> jar tf | wc -l
dsimon at kurz-3 ~/h/graal-core> find bin/jdk/vm/ci | wc -l

I'm guessing that these are the classes in referenced (transitively?) from the Graal sources.

Why is this happening? That is, why is javac extracting classes from a jar on the classpath and putting them in the output directory?


More information about the jigsaw-dev mailing list