B4J Question Java 24 Warnings

bdunkleysmith

Active Member
Licensed User
Longtime User
For those following the problem I'm encountering with a legacy app, after unsuccessfully trying Java 21 to see if that improved the reliability of videos played in MediaView under Win11, I thought I'd try Java 24.

While the app compiles and runs, the following warnings are being thrown:


These point to future problems with methods used to be blocked, although these warnings also reporting in this post appear to have just been dismissed, but they do prompt the questions:
  • How do I "enable-native-access=javafx.graphics", "enable-native-access=ALL-UNNAMED" and "enable-native-access=javafx.media"?

  • What do I do about the "A terminally deprecated method in sun.misc.Unsafe has been called warning"?

UPDATE:

The above warnings appear when running the app in the IDE, but running the compiled app via run_debug.bat the following additional warning is thrown:


So how do I "enable-native-access=b4j"?
 
Last edited:

Daestrum

Expert
Licensed User
Longtime User
Use
B4X:
    #VirtualMachineArgs: --enable-native-access=javafx.graphics --sun-misc-unsafe-memory-access=allow
just change to suit your needs.
 
Upvote 0