JDK-8346566 : Release Note: JavaFX Warning Printed for Use of Terminally Deprecated Methods in `sun.misc.Unsafe`
  • Type: Sub-task
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: jfx24
  • Priority: P3
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2024-12-18
  • Updated: 2025-03-14
  • Resolved: 2025-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
jfx24Resolved
Description
Running a JavaFX application on JDK 24 will produce a warning the first time any UI Control or complex shape is rendered:

```
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
...
WARNING: sun.misc.Unsafe::allocateMemory will be removed in a future release
```

To disable this warning, pass `--sun-misc-unsafe-memory-access=allow` to `java` on the command line. For example:

```
java --sun-misc-unsafe-memory-access=allow
```

This will be fixed in a subsequent version of JavaFX, after which time this flag will no longer be needed.