El siguiente código muestra en pantalla información sobre la distro de linux y la versión de java instalada en caso de existir:
import platform
import subprocess
print platform.architecture()
print platform.linux_distribution()
ret = subprocess.call('java -version', shell = True)
A continuación está lo que me imprimieron algunas distros:
centos 7 x64 por defecto:
('64bit', 'ELF')
('centos', '7.1.1503', 'Core')
java version "1.7.0_91"
OpenJDK Runtime Environment (rhel-2.6.2.1.el7_1-x86_64 u91-b00)
OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
Centos 6 x64 con Oracle Java 8:
('64bit', 'ELF')
('centos', '6.5', 'Final')
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
Ubuntu 14 x32 con Oracle Java 8:
('32bit', 'ELF')
('Ubuntu', '14.04', 'trusty')
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Server VM (build 25.65-b01, mixed mode)
Linux Mint 17 x32 por defecto:
('32bit', 'ELF')
('LinuxMint', '17.2', 'rafaela')
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
OpenJDK Server VM (build 24.79-b02, mixed mode)
Codingground webpage ide:
('64bit', '')
('Fedora', '23', 'Twenty Three')
openjdk version "1.8.0_72"
OpenJDK Runtime Environment (build 1.8.0_72-b15)
OpenJDK 64-Bit Server VM (build 25.72-b15, mixed mode)
Ideone webpage ide:
('32bit', '')
('debian', 'stretch/sid', '')