I do not know a way to directly access that information from java but an alternative is to use the systeminfo command of the windows console (CMD) which also provides us with additional information regarding our machine.
The only disadvantage is that it is tied to the windows platform but I suppose that in other systems there are similar alternatives.
I'll give you an example:
public class PCInformation {
public static void main(String[] args) throws IOException {
System.out.println("Bios Date is : "+getBiosDate());
}
public static String getBiosDate() throws IOException {
Runtime runtime = Runtime.getRuntime();
String[] commands = { "systeminfo" };
Process process = runtime.exec(commands);
BufferedReader lineReader =
new BufferedReader(new InputStreamReader(process.getInputStream()));
String biosInfo = lineReader.lines()
.filter(line -> line.contains("BIOS"))
.findFirst().get();
String biosDate = biosInfo.substring(biosInfo.indexOf(",")+1).trim();
return biosDate;
}
}
* The function returns a String, I guess for you it will not be complicated to make the conversion to Date or any other type of object for handling dates.