Skip to content

Commit

Permalink
Update "--add-exports/--add-opens" VM options for Java 19 (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndkoval authored May 4, 2023
1 parent 86e0b23 commit 7cb4d28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ To use model checking strategy for Java 9 and later, add the following JVM prope
```text
--add-opens java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.base/jdk.internal.util=ALL-UNNAMED
--add-exports java.base/sun.security.action=ALL-UNNAMED
```

They are required if the testing code uses classes from the `java.util` package since
Expand All @@ -51,7 +52,11 @@ If you use Gradle, add the following lines to `build.gradle.kts`:

```
tasks.withType<Test> {
jvmArgs("--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED", "--add-exports=java.base/jdk.internal.util=ALL-UNNAMED")
jvmArgs(
"--add-opens", "java.base/jdk.internal.misc=ALL-UNNAMED",
"--add-exports", "java.base/jdk.internal.util=ALL-UNNAMED",
"--add-exports", "java.base/sun.security.action=ALL-UNNAMED"
)
}
```

Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ tasks {
maxParallelForks = 1
jvmArgs(
"--add-opens", "java.base/jdk.internal.misc=ALL-UNNAMED",
"--add-exports", "java.base/jdk.internal.util=ALL-UNNAMED"
"--add-exports", "java.base/jdk.internal.util=ALL-UNNAMED",
"--add-exports", "java.base/sun.security.action=ALL-UNNAMED"
)
}

Expand Down

0 comments on commit 7cb4d28

Please sign in to comment.