ILE native methods for Java

The IBM® i Java™ virtual machine (JVM) supports the use of native methods running in the integrated language environment (ILE).

Support for ILE native methods includes:

When using ILE native methods, you show take the following in consideration:
  • ILE programs or service programs that use JNI functions must be compiled with teraspace storage enabled. This is necessary because the Java object is in PASE for i storage, which is mapped on top of teraspace storage, and a teraspace storage pointer is returned. Also, the JNI functions, such as GetxxxArrayRegion, have a parameter to a buffer where the data is placed. This pointer must point to teraspace storage to enable the JNI function in PASE for i to copy the data into this storage. If you do not compile your program with teraspace storage enabled, you will receive the escape message MCH4443 (Invalid storage model for target program LOADLIB).
  • All JNI functions expect their string parameters to be encoded in UTF-8. For more information about strings and JNI functions, see Strings in ILE native methods.