⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testc.java.svn-base

📁 aresde 空间数据开发 例子
💻 SVN-BASE
字号:
package registry;

import com.ice.jni.registry.RegDWordValue;
import com.ice.jni.registry.RegStringValue;
import com.ice.jni.registry.Registry;
import com.ice.jni.registry.RegistryKey;
import com.ice.jni.registry.RegistryValue;


public class TestC {
 public static void main(String[] str) {
        try {
         
              RegistryKey child = Registry.HKEY_CURRENT_USER
                      .openSubKey("Software").openSubKey("ODBC").openSubKey("ODBC.INI").openSubKey("data_0930",RegistryKey.ACCESS_ALL);//操作权限是通过RegistryKey来获取的。
              String de = "F:\\commony\\test\\data\\070901";  //我的DBF数据的目录
//其中,data_0930是我第一次设置的数据源的一个注册表的名称
              System.out.println(child.getStringValue("SourceDB"));
             child.setValue(new RegStringValue(child,"SourceDB",de));
              System.out.println(child.getFullName());
              
              
              
              
              
            //  Registry.HKEY_CURRENT_USER.createSubKey(arg0, arg1)
              
              
//              RegistryKey registryKey = Registry.openSubkey(Registry.HKEY_CURRENT_USER,    
//                      "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings" ,    
//                      RegistryKey.ACCESS_READ);    
//                 RegistryValue registryValue = registryKey.getValue( "ProxyEnable" );    
//                 boolean proxyEnable = ((RegDWordValue)registryValue).getData()!= 0 ;    
//                    
//                 System.out.println( "IE 是否启用了代理设置: " +proxyEnable);    
//                    
//                 if (proxyEnable)    
//                 {    
//                     registryValue = registryKey.getValue( "ProxyServer" );    
//                     System.out.println( "IE 代理服务器是: " + new String(registryValue.getByteData()));    
//                 }    

              
              
        } catch (Exception e) {
              e.printStackTrace();
        }
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -