Hi, What branch and JDK version are you using? Is should not be necessary to configure `--add-opens` by hand. In the past, I ran into problems like this, when I was moving back and forth between JDK versions, and sometimes the IDE can stuck in a confused state.
In general, I would suggest to invalidate caches ('File -> Invalidatre Caches...'), mark everything there except the embedded browser cleanup. To start from a clean slate, you can also close IntelliJ, and remove the `.idea` and all `*.iml` files from the cloned repository. Assuming `release-2.0` or `master` branch, for development IMO JDK17 should be used. So before anything, I tend to build the project from the terminal with JDK17 + Maven 3.8.6 via `mvn clean install -DskipTests -Dfast -T1`, this will definitely succeed. >From this point, when you reopen the project in IntelliJ, make sure the >Project SDK is set to JDK17. In the general settings, under 'Build, Execution, Deployment -> Compiler -> Java Compiler' you can check the applied 'Project bytecode version' and 'Per-module bytecode version', but by default those should match the project SDK. +1 hint, sometimes it can be confusing why IntelliJ cannot build Scala modules. In my experience most of the times, the cause of that is the Scala compiler is configured for a different JDK version than the project. That can be checked under 'Build, Execution, Deployment -> Compiler -> Scala Compiler -> Scala Compile Server', and making sure the JDK configured there matches with the one configured at project SDK. Cheers, Ferenc On Tuesday, May 27th, 2025 at 04:10, pranav tiwari <pranav...@gmail.com> wrote: > > > Hi, > Please guide me for the problem mentioned in the trailing mail. > > > On Mon, 26 May 2025 at 7:09 PM, pranav tiwari pranav...@gmail.com wrote: > > > Hi, > > > > I recently cloned the Flink source code, and am trying to run the main > > method of the *CliFrontend.java *class of the flink-clients package, > > but getting the following error message- > > > > package sun.rmi.registry is not visible (package sun.rmi.registry is > > declared in module java.rmi, which does not export it to the unnamed > > module)sun.rmi.registry > > > > I am running this in intellij. I have added below in VM options of > > intellij run configuration, but still getting the same error. > > > > --add-exports=java.base/sun.net.util=ALL-UNNAMED > > --add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED > > --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED > > --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED > > --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED > > --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED > > --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED > > --add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED > > --add-opens=java.base/java.lang=ALL-UNNAMED > > --add-opens=java.base/java.net=ALL-UNNAMED > > --add-opens=java.base/java.io=ALL-UNNAMED > > --add-opens=java.base/java.nio=ALL-UNNAMED > > --add-opens=java.base/sun.nio.ch=ALL-UNNAMED > > --add-opens=java.base/java.lang.reflect=ALL-UNNAMED > > --add-opens=java.base/java.text=ALL-UNNAMED > > --add-opens=java.base/java.time=ALL-UNNAMED > > --add-opens=java.base/java.util=ALL-UNNAMED > > --add-opens=java.base/java.util.concurrent=ALL-UNNAMED > > --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED > > --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED > > > > Please let me know how this can be fixed? > > > > Thank you > > Pranav