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

Details

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:
https://stackoverflow.com/questions/69494854/archlinux-cant-build-bazel-java-tutorial/69497608#69497608
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:17 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p 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
https://wiki.archlinux.org/title/Java

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

Loading...