Rational Developer for System z
PL/I for Windows, Version 7.6, Programming Guide

JNI Sample Program #1 - ’Hello World’

The first sample program we will write is yet another variation of the "Hello World!" program.

Our "Hello World!" program has one Java class, callingPLI.java. Our native method, written in PL/I, is contained in hiFromPLI.pli. Here is a brief overview of the steps for creating this sample program:

  1. Write a Java program that defines a class containing a native method, loads the native load library, and calls the native method.
  2. Compile the Java program to create a Java class.
  3. Write a PL/I program that implements the native method and displays the "Hello!" text.
  4. Compile and link the PL/I program.
  5. Run the Java program which calls the native method in the PL/I program.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)