4 ms·
I cannot understand why they think it is a good idea to require you to pass on the command-line the name of every module allowed to access native code. You can
by pie_flavor 5y ago
I cannot understand why they think it is a good idea to require you to pass on the command-line the name of every module allowed to access native code. You can already do unsafe things with JNI today, that hasn't gone anywhere. And while it's much more performant than JNI was, it's still not performant enough for them to write all the syscalls in the standard library in it, unlike P/Invoke is for .NET.
- shellac 5y ago> it's still not performant enough for them to write all the syscalls in the standard library in it I'm not sure why you are inferring that. They aren't replacing openjdk vm intrinsics using this immediately, but that's hardly surprising for a brand new feature.
- pie_flavor 5y agoThe biggest features since Java 8 have been made specifically to reimplement the JRE in them, like Jigsaw. It's not unreasonable to expect it.
- samus 5y agoJNI will probably never truly die, but it's reasonable to assume that it will eventually become restricted in similar ways. The motivation is simple: applications should become the arbiters that decide which modules get to invoke native code. Libraries don't get to nilly-willy call non-Java code anymore. If, say, a dependency upgrade introduces changes that involve a new native call, it will be very noticeable.