请问java有什么方法能获取CPU号码?现在想让程序获得CPU号码,只有得到认证的CPU号码的机器才能连接到服务器,请问java能否实现这个功能!

解决方案 »

  1.   

    昨天自己找的答案:
    1. Wrong forum.
    2. You can't. You'll have to invoke a native program that writes this info out, and read its output from your java program. 
    3. yep, wrong forum as already explained.
    4. if your targeted OS has an extensive monitoring that is accessible thru SNMP, then it can be done IMHO, go to an instrumentation forum (or maybe JMX related)Java没有办法可以直接访问硬件,使用JNI,或者访问一些特殊的文件,比如Linux的/proc filesystem都是解决方法。
      

  2.   

    可以调用C的程序访问。或者根据不同的操作系统系统采用不同的方法,如WIN的EXE(DOS命令)之类的
      

  3.   

    使用别的程序获得吧,如C,然后在JAVA中使用JNI.