Hi I met the same problem before. After some digging, I find that the idea will detect the JDK version and choose whether to use the jdk11 option to run the flink maven building. if you are in jdk11 env, then it will add the option --add-exports when maven building in IDEA.
For my case, I was in IntelliJIdea2019.2 which depends on the jdk11, and once I re-import the flink modules then the IDEA will add the --add-exports flag even if I removed all the flags in .idea/compile.xml explicitly. I noticed that the Intellij's JDK affected the flink maven building, so I turned to use the Intellij with JDK8 bundled, then the problem was gone. You can verify it, and if it's really the same. can just replace your IDEA with the pkg suffix with "with bundled JBR 8" in here [1]. Say if you are using MacOS, then should download the package "2019.2.4 for macOS with bundled JBR 8 (dmg)" Hope it works for you Thanks. [1]. https://www.jetbrains.com/idea/download/other.html On Mon, Nov 4, 2019 at 5:44 PM Till Rohrmann <trohrm...@apache.org> wrote: > Try to reimport that maven project. This should resolve this issue. > > Cheers, > Till > > On Mon, Nov 4, 2019 at 10:34 AM 刘建刚 <liujiangangp...@gmail.com> wrote: > > > Hi, I am using flink 1.9 in idea. But when I run a unit test in > idea. > > The idea reports the following error:"Error:java: 无效的标记: > > --add-exports=java.base/sun.net.util=ALL-UNNAMED". > > Everything is ok when I use flink 1.6. I am using jdk 1.8. Is it > > related to the java version? > > >