gz
我也做过一个,在其中也设了sock 代理,可还是不行。 Properties props=System.getProperties();
 props.put("socksProxyHost","...");
 props.put("socksProxyPort","...");或者在运行时: java -DsocksProxyHost=... -DsocksProxyPort=... myclass都不行,可能是我们的 sock 代理,有问题。我设置 http 代理时就成功了,方法也告诉你吧:http.proxyHost // standard HTTP proxy 
http.proxyPortftp 代理设置:Properties props = System.getProperties();
props.put("ftp.useProxy", "true");
props.put("ftp.proxyHost", "proxyhostname");
props.put("ftp.proxyPort", "proxyhostport");