Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> Development >> Languages >> Java >> examples >> How to access URL from java with and without proxy server

Accessing URL without proxy:-

$JAVA_HOME/bin/java -Dhttps.proxyHost=192.168.1.1 -Dhttps.proxyPort=8080 URLReader "https://www.google.com"


Example for http URL via proxy server:-

$JAVA_HOME/bin/java -Dhttp.proxyHost=192.168.1.1 -Dhttp.proxyPort=8080 URLReader "http://www.google.com"


Example for https URL via proxy server:-

$JAVA_HOME/bin/java -Dhttps.proxyHost=192.168.1.1 -Dhttps.proxyPort=8080 URLReader "https://www.google.com"

 

The sample source code for URLReader.java is here

 

 

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]