有时候,在Linux系统,需要JDK的位数和Linux的位数保持一致,都是32或者64位的。那么我们就需要知道如何获得JDK的位数。

其实很简单,就这么一句话,这是JDK的系统属性。
1
    System.out.println("bit of JVM is "+System.getProperty("sun.arch.data.model"));


得到Linux位数的方法
1
 getconf LONG_BIT


相关文章:

  • 2022-02-24
  • 2021-12-20
  • 2021-06-17
  • 2021-11-19
  • 2022-12-23
  • 2021-11-24
  • 2021-12-05
猜你喜欢
  • 2021-06-21
  • 2021-05-20
  • 2021-12-05
  • 2021-12-18
  • 2022-01-25
  • 2021-06-15
相关资源
相似解决方案