Example: IBM PASE for i native method for Java
The PASE for i native method for Java™ example calls an instance of a native C method that then uses Java Native Interface (JNI) to call back into Java code. Rather than accessing the string directly from Java code, the example calls a native method that then calls back into Java through JNI to get the string value.
To see HTML versions of the example source files, use the following links:
Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.
Before you can run the PASE for i native method example, you must complete the tasks in the following topics:
- Example: Downloading the example source code to your AIX workstation
- Example: Preparing the example source code
- Example: Preparing your IBM i server to run the PASE for i native method for Java example
Running the PASE for i native method for Java example
After you complete the previous tasks, you can run the example. Use either of the following commands to run the example program:
- From an IBM® i command
prompt:
JAVA CLASS(PaseExample1) CLASSPATH('/home/example')
- From a Qshell command prompt or PASE for i terminal session:
cd /home/example java PaseExample1