On 27/09/2016 11:41, Andrew Haley wrote:

Sorry, this should be simple, but I don't get it.

In this program:

import java.util.logging.Logger;

public class TestClass {
}


aph@arm64:~/SPECjvm2016/unpack$ 
~/hs-comp/build/linux-aarch64-normal-server-release/images/jdk/bin/javac 
--add-reads java.compiler=java.logging,java.prefs,java.desktop,ALL-UNNAMED  
-Xmodule:java.compiler TestClass.java
TestClass.java:1: error: package java.util.logging does not exist
import java.util.logging.Logger;
                         ^
1 error
aph@arm64:~/SPECjvm2016/unpack$ cat TestClass.java

I'm a bit baffled.
javac could probably emit a better message here. In any case, can you add `--add-modules java.logging` to this. The issue is that you are compiling TestClass "as if" it's in the java.compiler module but that module does not require java.logging. There has been suggestions that --add-reads should imply --add-modules but no conclusion on that.

-Alan

Reply via email to