获取CPU序列号
/**
* 获取CPU序列号
* @return
*/
public static String getCpuId() throws IOException {
Process process = Runtime.getRuntime().exec(
new String[]{"wmic", "cpu", "get", "ProcessorId"});
process.getOutputStream().close();
Scanner sc = new Scanner(process.getInputStream());
String property = sc.next();
String serial = sc.next();
System.out.println(property + ": " + serial);
return serial;
}
作者:彼岸舞
时间:2020\06\24
内容关于:工作中用到的小技术
本文部分来源于网络,只做技术分享,一概不负任何责任