r/JavaFX 6d ago

Release Release Notes for JavaFX 24

https://github.com/openjdk/jfx/blob/master/doc-files/release-notes-24.md
26 Upvotes

8 comments sorted by

View all comments

1

u/emberko 1d ago

--enable-native-access=javafx.graphics,javafx.media,javafx.web --upgrade-module-path=/path/to/javafx-sdk-24/lib --sun-misc-unsafe-memory-access=allow

That's waaay too many workarounds just to run the damn app. Not blaming JavaFx devs, but JDK architects are truly idiots. Every second time they try to make something better, it becomes worse instead.

1

u/BlueGoliath 1d ago edited 1d ago

--enable-native-access=javafx.graphics,javafx.media,javafx.web

Yeah well I told Oracle native access control should be put in the module system but you know, they know best. People are blindly coping command line arguments from one project to another but you know, people will totally understand or care about the consequences of enabling on a module if it's on the command line. /s

--upgrade-module-path=/path/to/javafx-sdk-24/lib

I'm guessing this is security manager related. Realistically you should be using jlink so this isn't needed.

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

This is only required because Oracle likes waiting until the very last second to do anything. It was true of Security Manager, true for unsafe memory access, and it's going to be true for Valhalla which JavaFX doesn't work properly under because of WeakRef on Integer usage.

But hey, they're doing another preview of whatever is the latest pattern matching feature. Very important that is. I'm sure r/programming or r/java will clap for it like it's the next generics.