javac unzips class files from jars on class path into output directory
Doug Simon
doug.simon at oracle.com
Tue Mar 7 18:11:41 UTC 2017
Hi Jon,
I've attached bug.zip which should reproduce the issue (assuming jdk 9 javac is on your path):
unzip bug.zip
cd bug
./run.sh
find bin
The last command above should show the extra class files from jdk.internal.vm.ci.jar in bin.
-Doug
-------------- next part --------------
> On 7 Mar 2017, at 18:55, Jonathan Gibbons <jonathan.gibbons at oracle.com> wrote:
>
>
>
> On 03/07/2017 08:06 AM, Doug Simon wrote:
>> 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 jdk.internal.vm.ci.jar:jdk.unsupported_sun.misc.Unsafe.jar -d bin/ --release 8 graal/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/*.java
>>
>> where:
>>
>> dsimon at kurz-3 ~/h/graal-core> ls graal/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/*.java
>> graal/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalJVMCICompiler.java
>> graal/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalRuntime.java
>>
>> I expect 2 class files to be written to bin/. However, I see a number of files from jdk.internal.vm.ci.jar in bin:
>>
>> dsimon at kurz-3 ~/h/graal-core> jar tf jdk.internal.vm.ci.jar | wc -l
>> 444
>> dsimon at kurz-3 ~/h/graal-core> find bin/jdk/vm/ci | wc -l
>> 55
>>
>> I'm guessing that these are the classes in jdk.internal.vm.ci.jar 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?
>>
>> -Doug
>
> Doug,
>
> Can you provide a more complete test case?
>
> -- Jon
More information about the jigsaw-dev
mailing list