Java Native Method Invocation performance considerations

Native method invocation on an iSeries™ server may not perform as well as native method invocation on other platforms.

Java™ on the iSeries server has been optimized by moving the Java virtual machine below the machine interface (MI). Native method invocation requires a call to above MI code and may require expensive Java Native Interface (JNI) calls back into the Java virtual machine. Native methods should not carry out small routines, which you can easily write in Java. Only use native methods to start system functions that are relatively long running and are not available directly in Java.

Related concepts
Java event trace performance tools
Java performance considerations
Java garbage collection
Java method inlining performance considerations
Java exception performance considerations
Java call trace performance tools
Java profiling performance tools
Related tasks
Collect Java performance data