@@ -71,7 +71,15 @@ allprojects {
71
71
suspend = true
72
72
}
73
73
74
- jvmArgs + = ' --illegal-access=permit'
74
+ // Since JDK 17 the default access to the following
75
+ // packages is "deny". We need to open them in order
76
+ // to gain access in GDS / Neo4j.
77
+ jvmArgs + = ' --add-opens=java.base/java.lang=ALL-UNNAMED'
78
+ jvmArgs + = ' --add-opens=java.base/java.lang.invoke=ALL-UNNAMED'
79
+ jvmArgs + = ' --add-opens=java.base/java.nio=ALL-UNNAMED'
80
+ jvmArgs + = ' --add-opens=java.base/java.util.stream=ALL-UNNAMED'
81
+ jvmArgs + = ' --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED'
82
+
75
83
maxHeapSize = " 3G"
76
84
useJUnitPlatform {
77
85
includeEngines ' junit-jupiter'
@@ -94,7 +102,16 @@ allprojects {
94
102
targetCompatibility = JavaVersion . VERSION_11
95
103
options. warnings = true
96
104
options. encoding = ' UTF-8'
97
- options. forkOptions. jvmArgs + = ' --illegal-access=permit'
105
+
106
+ // Since JDK 17 the default access to the following
107
+ // packages is "deny". We need to open them in order
108
+ // to gain access in GDS / Neo4j.
109
+ options. forkOptions. jvmArgs + = ' --add-opens=java.base/java.lang=ALL-UNNAMED'
110
+ options. forkOptions. jvmArgs + = ' --add-opens=java.base/java.lang.invoke=ALL-UNNAMED'
111
+ options. forkOptions. jvmArgs + = ' --add-opens=java.base/java.nio=ALL-UNNAMED'
112
+ options. forkOptions. jvmArgs + = ' --add-opens=java.base/java.util.stream=ALL-UNNAMED'
113
+ options. forkOptions. jvmArgs + = ' --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED'
114
+
98
115
options. compilerArgs + = [
99
116
' -parameters' ,
100
117
' -Xlint:all,-cast,-deprecation,-processing,-serial,-try,-unchecked,-varargs' ,
0 commit comments