请问在java里怎样获取IE的代理设置,然后又利用该设置来读取url数据
解决方案 »
- Oracle Publisher 使用 xml 文件 和 xsl 文件 生成 pdf文件 时,报错。
- 北大acm 1002 求救
- 【请教】SWT如何显示16位灰度图像?
- java里面的包的问题
- comm.jar操作串口,出现WaitCommEvent错误,急,请大家帮忙?
- 为什么我用dispose()关闭了当前窗口,但在控制台中看到程序还在继续运行?
- 急!!applet传参数到servlet,然后servlet返回(writeObject)的字符串非常大时出现错误,希望高手帮忙,谢了
- 一道关于单例模式的题
- 大家猜猜结果是什么?
- 我调试的文件已经建立,为什么总是返回false??
- 100分求windows系统服务问题!
- [200分]关于Calendar和Date的初级超难问题??如果解答马上给分!
System.getProperties().put("proxySet","true");
System.getProperties().setProperty( "http.proxyHost","RDPROXY");
System.getProperties().setProperty( "http.proxyPort","80");
其中http.proxyHost http.proxyPort分别换成自己的代理地址和端口
System.getProperties().put("proxySet","true");
System.getProperties().setProperty( "http.proxyHost","你自己的代理地址");
System.getProperties().setProperty( "http.proxyPort","你自己的代理端口");
URL url = new URL("http://163.com");
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String str;
while ((str = in.readLine()) != null) {
System.out.println(str);
}
in.close();
}catch(Exception e){
e.printStackTrace();
}
JDK 5.0. You can also use this class in Java App, but the proxy info
returned is what you pass on command line, such as -Dhttp.proxyHost=..