Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 231863 - Automatically parse http_proxy var in java launcher
Summary: Automatically parse http_proxy var in java launcher
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-15 14:08 UTC by Hanno Böck
Modified: 2009-03-31 18:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.