jackye1995 commented on code in PR #7391:
URL: https://github.com/apache/iceberg/pull/7391#discussion_r1175773589


##########
build.gradle:
##########
@@ -68,10 +68,36 @@ try {
 
 if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
   project.ext.jdkVersion = '8'
+  project.ext.extraJvmArgs = []
 } else if (JavaVersion.current() == JavaVersion.VERSION_11) {
   project.ext.jdkVersion = '11'
+  project.ext.extraJvmArgs = []
+} else if (JavaVersion.current() == JavaVersion.VERSION_17) {
+  project.ext.jdkVersion = '17'
+  project.ext.extraJvmArgs = ["-XX:+IgnoreUnrecognizedVMOptions",
+                              "--add-opens", "java.base/java.io=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/java.lang.invoke=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/java.lang.reflect=ALL-UNNAMED",
+                              "--add-opens", "java.base/java.lang=ALL-UNNAMED",
+                              "--add-opens", "java.base/java.math=ALL-UNNAMED",
+                              "--add-opens", "java.base/java.net=ALL-UNNAMED",
+                              "--add-opens", "java.base/java.nio=ALL-UNNAMED",
+                              "--add-opens", "java.base/java.text=ALL-UNNAMED",
+                              "--add-opens", "java.base/java.time=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/java.util.concurrent.atomic=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/java.util.concurrent=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/java.util.regex=ALL-UNNAMED",
+                              "--add-opens", "java.base/java.util=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/jdk.internal.ref=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/jdk.internal.reflect=ALL-UNNAMED",
+                              "--add-opens", "java.sql/java.sql=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/sun.util.calendar=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/sun.nio.ch=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/sun.nio.cs=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/sun.security.action=ALL-UNNAMED",
+                              "--add-opens", 
"java.base/sun.util.calendar=ALL-UNNAMED"]

Review Comment:
   maybe we could provide a list of classes to open and generate the 
`--add-opens` and `=ALL-UNNAMED` boilerplates. But that might be 
over-engineering, and I am fine as is. Curious what other people think.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to