Use this procedure to determine if Java is correctly set up on your system. Do the following from a command line in the native user interface:
Enter one of the following commands:
To check Java 8, enter the command:
ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit') CCSID(*JOB) LEVEL(*JOB) REPLACE(*YES)Start a QShell session by entering the command:
STRQSHFrom the QShell session, run the following commands:
a.Enter the command:
java -versionFor Java 8, you should see results similar to the following:
java version "1.8.0"Java(TM) SE Runtime Environment (build pap6480sr3fp10-20160720_02(SR3fp10))IBM J9 VM (build 2.8, JRE 1.8.0 OS/400 ppc64-64 Compressed References jvmap6480sr3fp10-20160720_02_cr (JIT enabled, AOT enabled)J9VM - R28_Java8_SR3_20160719_1144_B312156JIT - tr.r14.java_20160629_120284.01GC - R28_Java8_SR3_20160719_1144_B312156_CMPRSSJ9CL - 20160719_312156)JCL - 20160719_01 based on Oracle jdk8u101-b13$b.Enter the command:
java -classpath /qibm/proddata/java400 HelloYou should see the following:
Hello World$If you do not get the expected results, reinstall Java and apply the latest PTFs.
To exit the QShell session, press F3.