There is no 100% reliable / portable way to do this, but the following procedure should give you some confidence that Java has been installed and configured correctly (on Linux):
- , "JAVA_HOME" , "bin", "bin" "java".
- , "java", "PATH", , 1.
- "java" "-version", , Java.
, - .
, , . Java Python, , "java" . , .