I have logged in to the IBM I machine and I have to check the installed Java version on my IBM i machine so that I can make a check based on the Java version installed and execute some logic. Any idea how can I find it?
Sorry, you do not have permission to ask a question, You must login to ask a question.
Sorry, you do not have permission to ask a question.
I have logged in to the IBM I machine and I have to check the installed Java version on my IBM i machine so that I can make a check based on the Java version installed and execute some logic. Any idea how can I find it?
You can print the output of the
RUNJVA
command to get the installed Java version on IBM i by runningrunjva class(*version) output(*print)
command from the command line.Please note that this
RUNJVA
command will be executed in a separate batch Job on IBM i where the Job nameQJVACMDSRV
is fixed and the user name is your user profile and the number is auto-generated. The output gets printed to theQPRINT
spool file in the same batch job.You can also check the installed Java version on IBM i by running
qsh cmd('java -version')
command on the IBM i command line which invokes the Qshell environment and checks the Java version from within the shell.The output you will get:
Please note that if multiple versions of Java are installed, this will show the default Java version in use.
You can execute the
RUNJVA
command on the IBM i which is used to run Java commands on the IBM i machine.When you run
RUNJVA CLASS(*VERSION)
, it will display the installed Java version on your IBM i machine.The output of this command would look like:
Java Shell Display
Here, as per the above output, the Java version is
1.8.0_411
which is a specific build ofJava 1.8 (Java 8)
.