When you use checks bin / check-java-heap-pcnt.sh and bin / metrics-java-heap-graphite.sh, instead of the actual Java version you are using, it is always calculated as JAVA 7, the variable used is a string and in the comparation statement is treating as an array this causes to return as a number of fields 1, calculating the memory as Java7 instead to be agnostic.
When you use checks bin / check-java-heap-pcnt.sh and bin / metrics-java-heap-graphite.sh, instead of the actual Java version you are using, it is always calculated as JAVA 7, the variable used is a string and in the comparation statement is treating as an array this causes to return as a number of fields 1, calculating the memory as Java7 instead to be agnostic.