I use a VPN client to access a website. My browers, like chrome, IE and firefox can all access the website. But java code, wget, curl cannot. Is there any setting for java to activate the function?
My VPN client is Jonus Pluse.
Try run your java application with :
java -Dhttp.proxyHost=webcache.example.com -Dhttp.proxyPort=8080;
Or set proxy before you get access to the network using HTTP:
System.setProperty("http.proxyHost", "webcache.example.com");
System.setProperty("http.proxyPort", "8080");
You can find the answer in the Java documentation.
Typically, you would use system properties:
java -Dhttp.proxyHost=10.0.0.100 -Dhttp.proxyPort=8800 ....