获取CPU序列号

 1  /**
 2      * 获取CPU序列号
 3      * @return
 4      */
 5     public static String getCpuId() throws IOException {
 6         Process process = Runtime.getRuntime().exec(
 7                 new String[]{"wmic", "cpu", "get", "ProcessorId"});
 8         process.getOutputStream().close();
 9         Scanner sc = new Scanner(process.getInputStream());
10         String property = sc.next();
11         String serial = sc.next();
12         System.out.println(property + ": " + serial);
13         return serial;
14     }

作者:彼岸舞

时间:2020\06\24

内容关于:工作中用到的小技术

本文部分来源于网络,只做技术分享,一概不负任何责任

相关文章:

  • 2022-01-21
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2021-10-18
  • 2021-10-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2022-02-02
  • 2022-12-23
相关资源
相似解决方案