好像是java的安全限制!修改java.policy文件

解决方案 »

  1.   

    This package allows applications to store and retrieve user and system preference and configuration data. This data is stored persistently in an implementation-dependent backing store. There are two separate trees of preference nodes, one for user preferences and one for system preferences. 
    建议去这里看看:
    http://java.sun.com/j2se/1.4/docs/api/java/util/prefs/package-summary.html
      

  2.   

    sun既然提供了这样一个类,肯定是能够实现的,可以好好看看这个http://java.sun.com/j2se/1.4/docs/api/java/util/prefs/Preferences.html
      

  3.   

    源码中systemRoot确实是HKEY_LOCAL_MACHINE啊
    为什么换成了JavaSoft了呢?
      

  4.   

    火鸟兄,关于API我是研究透了,因为windowsPerferences是包内私有的,所以在API中根本不会出现,下载JDK后,可以看源码,源码里有,不过类注释有一句这样的话:Use is subject to license terms.呵呵,你们说是什么意思?
       用Perferences是可以访问,但是问题,它只能访问JavaSoft下面的Prefs这个键(熟悉注册表的可以找到),也就是systemRoot,始终无法上溯到父键,所以这个类对于注册表的操作是无太大意义的,它本来也就是个抽象,是提供继承具体实现的。
        所以,各位兄台,如果有空,烦请钻研,意义蛮重大呀!(在网上有这样的产品,妈的,可惜要收费,居然要200多美元,真是有抢!)