Panama will thankfully fix that.
https://jdk.java.net/panama/
Just don't expect it to ever be supported on Android.
But they surely will,
https://en.wikipedia.org/wiki/List_of_Java_virtual_machines#...