ByteBuffer considered not existing in JDK 22

Martin Pernollet martin.pernollet at protonmail.com
Sat May 11 08:08:25 UTC 2024


Hi,

In the process of migrating PanamaGL from JDK19 to JDK22 I am facing a weird issue : Eclipse can not import java.nio.ByteBuffer.

I initially faced this while trying to invoke [PixelFormat.getByteBgraInstance()](https://openjfx.io/javadoc/22/javafx.graphics/javafx/scene/image/PixelFormat.html#getByteBgraInstance()) from OpenJFX 22. I reproduce this with a simple standalone class

import java.nio.*; // OK

importjava.nio.ByteBuffer; // The import can not be resolved

publicclass TestBB {

publicstaticvoid main(String[] args) {

}

}

Browsing JDK content through Eclipse shows that the ByteBuffer class exist but trying to open it leads to an Eclipse exception (see screenshot)

[Capture d’écran 2024-05-11 à 09.31.59.png]

ByteBuffer already became a sealed class between JDK 17 and 19 so I presume this is not a reason for this problem.

Any idea of what is happening here?

Thanks in advance!

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20240511/06b9be17/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture d?e?cran 2024-05-11 a? 09.31.59.png
Type: image/png
Size: 2163443 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20240511/06b9be17/Capturedecran2024-05-11a09.31.59-0001.png>


More information about the panama-dev mailing list