How do we get the below details from Java code? Particularly SR and FP details.
java version "1.7.0"
Java(TM) SE Runtime Environment (build pap6470_27sr1fp1-20140708_01(SR1 FP1))
IBM J9 VM (build 2.7, JRE 1.7.0 AIX ppc64-64 Compressed References
20140707_205525 (JIT enabled, AOT enabled)
J9VM - R27_Java727_SR1_20140707_1408_B205525
JIT - tr.r13.java_20140410_61421.07
GC - R27_Java727_SR1_20140707_1408_B205525_CMPRSS
J9CL - 20140707_205525)
JCL - 20140707_01 based on Oracle 7u65-b16
That information is put together from the System properties. To find the appropriate set of properties, run java -XshowSettings:properties
.
In this case, the property you want is the java.runtime.version
which has a value like: pxi3270_27sr4-20160303_03 (SR4)
. You can parse the SR / FP out of the brackets. If there isn't one, then it's the GA level.