Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Java
Expertise: Beginner
Sep 16, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Go Through Proxies With Java

Network administrators make use of proxy servers to enhance the security of their networks. A proxy server can be seen as a service that manages connections between the internet and an internal network. If your network is sitting behind a proxy server, your Java application should know that internet calls will go through a proxy. It should also know the name of the proxy server, as well as the port at which the proxy server waits for internet calls. To provide this information to your Java application you can either have your application code set some system properties, as in:
System.getProperties().put( "proxySet", "true" );
System.getProperties().put( "proxyHost", "some_proxy" );
System.getProperties().put( "proxyPort", "8080" );
or set the relevant system properties when you launch your application from the command prompt, as in:
java -DproxySet=true -DproxyHost=some_proxy -DproxyPort=8080 SomeClass 
Behrouz Fallahi
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date