universions.java package

Module contents

Module to get the Java version.

universions.java.get_java_version(java_path: Union[pathlib.Path, str, None] = None) → Optional[universions.version.Version]

Get the Java versions.

Parameters:java_path – The path to the Java to check. If not defined, it uses JAVA_HOME from the enviroment variables to try $JAVA_HOME/bin/java. If JAVA_HOME is not defined either it tries only “java”.
Returns:The Java version.