To run each example use: java --enable-preview --source 24 <FileName.java>
- Prepare to Restrict the Use of JNI
- align the command-line options to be used equally between JNI and FFM API
- align how FFM API restrict the native method usage with warning instead of throwing an exception
- JNI shows warnings unless
--illegal-native-access=denyis provided
- JNI shows warnings unless
- to use the previous behave we need to provide the following command-line options:
--enable-native-access=MyModule --illegal-native-access=deny--illegal-native-access=warnis the default mode, in the future will bedeny- this ways it will thrown an exception
- added new JDK tool
jnativescanto help identify the use of restricted methods and declarations of native methods
- Late Barrier Expansion for G1
- reduce the overhead of C2 JIT compiler
- reduce the execution time of C2 when using G1