I have the following program:
module-info.java
module a {
}
Main.java
public clas
If you are using IntelliJ idea, try checking your Java compiler settings:
Go to the File menu -> [Settings] -> [Build, Execution, Deployment] -> [Java Compiler] and check the setting "Project bytecode version". I got a similar error ("exporting a package from system module java.datatransfer is not allowed with --release") when using JDK 11 while this value was still set to version 9. Setting it to 11 fixed the problem for me.