ByteBuffer considered not existing in JDK 22
Martin Pernollet
martin.pernollet at protonmail.com
Sun May 12 09:58:47 UTC 2024
Hi,
Two additional useful information
- this happens with macOS JDK only (tried ARM but not x86). No problem with Windows and Linux
- I get the problem both from Eclipse and when building from command line with Maven :
java.lang.Error:
Unresolved compilation problems:
The type java.nio.ByteBuffer cannot be resolved. It is indirectly referenced from required type org.jzy3d.painters.IPainter
The import java.nio.ByteBuffer cannot be resolved
The type PanamaGLPainter must implement the inherited abstract method IPainter.drawImage(ByteBuffer, int, int, Coord2d, Coord3d)
ByteBuffer cannot be resolved to a type
at org.jzy3d.painters.PanamaGLPainter.<init>(PanamaGLPainter.java:1)
Envoyé avec la messagerie sécurisée [Proton Mail.](https://proton.me/)
Le samedi 11 mai 2024 à 10:08 AM, Martin Pernollet <martin.pernollet at protonmail.com> a écrit :
> 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)
>
> 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/20240512/6a72bd8b/attachment-0001.htm>
More information about the panama-dev
mailing list