You can take advantage of i5/OS™ kernel threads using the java.lang.Thread class. Java™ threads operate on top of the i5/OS kernel threads model. Each Java thread is one of many tasks that runs in the process.
You can do all of the activities that are listed in the Threads Management section.
The Java virtual machine (JVM) always creates several threads to perform services such as Java garbage collection. The system uses these threads; applications should not use them.
You can use native methods to access system functions that are not available in Java. Native methods are not *PGM objects. They are procedures that are exported from Integrated Language Environment® (ILE) service programs (*SRVPGM). These native methods always run in processes that are multithreaded so they must be threadsafe. The ILE COBOL, RPG IV, CL, C and C++ compilers are threadsafe.
When it is necessary to call an ILE program (*PGM) object, use java.lang.Runtime.exec() to start another process in which the program can run.
Use exit() and abort() with care. These functions end the application, including the process and all the threads that run in the process.