Skip to content

fix: add --add-opens JVM options for JDK 17+ in startup-native.sh#14602

Merged
KomachiSion merged 1 commit intoalibaba:developfrom
lexburner:fix/add-opens-for-jdk17-in-startup-native
Mar 13, 2026
Merged

fix: add --add-opens JVM options for JDK 17+ in startup-native.sh#14602
KomachiSion merged 1 commit intoalibaba:developfrom
lexburner:fix/add-opens-for-jdk17-in-startup-native

Conversation

@lexburner
Copy link
Contributor

Summary

  • startup.sh already adds --add-opens flags when Java >= 9, but startup-native.sh was missing them
  • This causes InaccessibleObjectException on JDK 17+ when using the distribution package startup script
  • Added the same three --add-opens options to keep both scripts consistent:
    • --add-opens=java.base/java.lang=ALL-UNNAMED
    • --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
    • --add-opens=java.base/java.util=ALL-UNNAMED

Test plan

  • Verify startup-native.sh launches correctly on JDK 17+
  • Confirm no InaccessibleObjectException on reflection operations

🤖 Generated with [Qoder][https://qoder.com]

startup.sh already includes --add-opens flags for Java >= 9, but
startup-native.sh (used by distribution package) was missing them,
which causes InaccessibleObjectException on JDK 17+.

🤖 Generated with [Qoder][https://qoder.com]
@github-actions
Copy link

Thanks for your this PR. 🙏
Please check again for your PR changes whether contains any usage/api/configuration change such as Add new API , Add new configuration, Change default value of configuration.
If so, please add or update documents(markdown type) in docs/next/ for repository nacos-group/nacos-group.github.io


感谢您提交的PR。 🙏
请再次查看您的PR内容,确认是否包含任何使用方式/API/配置参数的变更,如:新增API新增配置参数修改默认配置等操作。
如果是,请确保在提交之前,在仓库nacos-group/nacos-group.github.io中的docs/next/目录下添加或更新文档(markdown格式)。

@KomachiSion KomachiSion merged commit a1ab77c into alibaba:develop Mar 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants