Is there an uniform way to detect the installed java on linux?
<p>Is there a way to detect the installed java on various different Linux distributions?
With Windows you could use the JAVA_HOME or the registry for that, but Linux? Can it be also detected if this is JDK, JRE, 32 or 64 bit?</p>

<p>REPHRASE: If I need 64-bit JDK on Linux, how do I programatically check that it is present and inform the user that he has some other java instead?</p>
