Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java proxy settings - Ubuntu

How do I set the Java proxy settings in Ubuntu (10.04 or 12.04), from the command line? What I am aiming at is to get direct connection, but by default it takes it from browser settings which are meant to go via a proxy - just I don't want Java to go via the proxy.

I am running an application server in Ubuntu which serves remote desktop sessions. I can put the Java control panel into the user's desktop, and then they (each individual user) can set the proxy settings under Network Settings. However - this means I have to tell each user to make this setting, which is not workable.

I want it set via some command line or environment variable on the server itself, so it defaults to "direct connection". I am not familiar with Java programming and it won't help much to give me Java code for this, I think it must be possible to set the defaults upon Java startup? Any pointers are welcome.

How can I do this?

like image 240
nepdev Avatar asked Mar 29 '13 20:03

nepdev


1 Answers

Instead of command line you can edit $javaDirectory/jre/lib/net.properties.

Remove # in-front of:

http.proxyHost="proxy host"
http.proxyPort="proxy port"
https.proxyHost="proxy host"
https.proxyPort="proxy port"

and set your proxy there.

like image 111
Arulselvan Dhandapani Avatar answered Oct 15 '22 11:10

Arulselvan Dhandapani