Skip to content

Commit

Permalink
Add-opens various java base packages to reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jul 3, 2024
1 parent 43d21fa commit c6867e4
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@ open class EclipseCreateInstallation : JavaExec() {
iniFileText = iniFileText.replace(Regex("""-X(ms|ss|mx)[0-9]+[gGmMkK]"""), "")

iniFileText += "--add-modules=ALL-SYSTEM\n"
// On Java 17+ we need to open some base packages for reflection
// See: https://github.com/RuedigerMoeller/fast-serialization/issues/327#issuecomment-1593789316
iniFileText += "--add-opens=java.base/java.io=ALL-UNNAMED\n"
iniFileText += "--add-opens=java.base/java.lang=ALL-UNNAMED\n"
iniFileText += "--add-opens=java.base/java.lang.invoke=ALL-UNNAMED\n"
iniFileText += "--add-opens=java.base/java.math=ALL-UNNAMED\n"
iniFileText += "--add-opens=java.base/java.net=ALL-UNNAMED\n"
iniFileText += "--add-opens=java.base/java.text=ALL-UNNAMED\n"
iniFileText += "--add-opens=java.base/java.util=ALL-UNNAMED\n"
iniFileText += "--add-opens=java.base/java.util.concurrent=ALL-UNNAMED\n"
if (os.get() == Os.OSX) {
iniFileText += "-XstartOnFirstThread\n"
}
Expand Down

0 comments on commit c6867e4

Please sign in to comment.