文件名称:java获取IE代理源码,包含dll
文件大小:43KB
文件格式:RAR
更新时间:2017-01-02 04:55:45
registry IE代理
引入java包后,可以直接调用,如:Registry.getProxy(),返回值如:192.168.0.146:80 代码示例: import com.ice.jni.registry.RegDWordValue; import com.ice.jni.registry.Registry; import com.ice.jni.registry.RegistryKey; import com.ice.jni.registry.RegistryValue; public class Util { /** 注册表中Internet表项位置 */ private static final String Internet = "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"; public static void main(String[] args) { try { // 注册表表项值 RegistryKey registryKey = Registry.openSubkey( Registry.HKEY_CURRENT_USER, Internet, RegistryKey.ACCESS_READ); // 注册表表项键 RegistryValue registryValue = registryKey.getValue("ProxyEnable"); boolean proxyEnable = ((RegDWordValue) registryValue).getData() != 0; // 代理设置是否开启 System.out.println("IE 是否启用了代理设置: " + proxyEnable); if (proxyEnable == true) // 开启了Internet代理 { registryValue = registryKey.getValue("ProxyServer"); String proxyServer = new String(registryValue.getByteData()); System.out.println("使用IE代理服务器." + proxyServer); } } catch (Exception e) { System.out.println("ERROR:操作Windows注册表失败."); } } }
【文件预览】:
toolsAndDll
----registry()
--------NoSuchKeyException.java(1KB)
--------HexNumberFormat.java(4KB)
--------RegDWordValue.java(2KB)
--------Registry.java(32KB)
--------RegMultiStringValue.java(3KB)
--------RegistryKey.java(18KB)
--------RegistryValue.java(4KB)
--------RegStringValue.java(2KB)
--------RegBinaryValue.java(2KB)
--------RegistryException.java(2KB)
--------NoSuchValueException.java(1KB)
----RegistryTools.java(3KB)
----ICE_JNIRegistry.dll(64KB)
----readme.txt(186B)