Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 231863

Summary: Automatically parse http_proxy var in java launcher
Product: Gentoo Linux Reporter: Hanno Böck <hanno>
Component: [OLD] JavaAssignee: Java team <java>
Status: CONFIRMED ---    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Hanno Böck gentoo-dev 2008-07-15 14:08:03 UTC
sun jre does not honour the http_proxy env variable, though it might be an idea to automatically parse it inside launcher.bash.

Some code (probably not very nice and optimized, but "worksforme") how this could be done:
        proxy_port=`echo $http_proxy|sed -e 's/.*://g'`
        proxy_host=`echo $http_proxy|sed -e 's!.*://\(.*\):.*!\1!g'`
        java -Dhttp.proxyHost=$proxy_host -Dhttp.proxyPort=$proxy_port -jar somejarfile.jar
Comment 1 Serkan Kaba (RETIRED) gentoo-dev 2008-07-15 18:13:47 UTC
(In reply to comment #0)
> sun jre does not honour the http_proxy env variable, though it might be an idea
> to automatically parse it inside launcher.bash.
> 
> Some code (probably not very nice and optimized, but "worksforme") how this
> could be done:
>         proxy_port=`echo $http_proxy|sed -e 's/.*://g'`
>         proxy_host=`echo $http_proxy|sed -e 's!.*://\(.*\):.*!\1!g'`
>         java -Dhttp.proxyHost=$proxy_host -Dhttp.proxyPort=$proxy_port -jar
> somejarfile.jar
> 

Try setting java.net.useSystemProxies to true in  ~/.gentoo/java-config-2/current-user-vm/jre/lib/net.properties
Comment 2 Serkan Kaba (RETIRED) gentoo-dev 2008-11-27 05:14:31 UTC
Any news here?
Comment 3 James Broadhead 2009-03-31 18:05:28 UTC
This bug has just affected me; needing a proxy variable in jabref.