Find name of linux distro from java

We are writing a small library in java that needs to collect information from the underlying system. We are able to read most of the stuff from system properties in java, but we cannot seem to find the right way to extract the name of the distro when run on linux. The call

System.getProperty("os.name");

return "Linux" (which we also collect) but we are looking for a way to get e.g. "Ubuntu" as well. We need this solution in java and would like to not have to do some /etc/release parsing

5
задан wattostudios 1 May 2012 в 02:41
поделиться