There are two varieties of JRE available. Java VM: IBM vs. Sun.
Is there a way to know which JRE I am using through JavaScript or some Java issued command.
The Java system property System.getProperty(...) to consult is "java.runtime.name". This will distinguish between "OpenJDK Runtime Environment" and "Java(TM) SE Runtime Environment". They both have the same vendor - "Oracle Corporation".
This property is also included in the output for java -version.