Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#72985 - [jdk-openjdk] Missing opens flags java.lang and java.nio

Attached to Project: Arch Linux
Opened by Buovjaga (Buovjaga) - Sunday, 12 December 2021, 09:27 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:17 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Felix Yan (felixonmars)
Levente Polyak (anthraxx)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Trying to build a Bazel project fails with

java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.String(byte[],byte) accessible: module java.base does not "opens java.lang" to unnamed module

This happens both with openjdk 11 and 17.

Another person reported it on SO and received an answer, which solved it for me:
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:17 GMT
Reason for closing:  Moved
Additional comments about closing: ackaging/packages/java-openjdk/issues/4
Comment by Norman Jordan (njordan) - Thursday, 11 August 2022, 04:18 GMT
Current "default" version of Java is 18. That is not yet supported by Bazel. It currently supports Java 8 through 15. The bazel package already depends on JDK 11.

A couple of fixes here:
1. Set your JAVA_HOME environment variable to a supported JDK
2. Change the default JDK usng archlinux-java

Given that the bazel package already depends on jdk11-openjdk, I don't think that anymore could be done.