String proxyHost = System.getProperty("proxyHost");
        String proxyPort = System.getProperty("proxyPort");
        String nonProxyHosts = System.getProperty("nonProxyHosts");
           
        if (proxyHost != null)
        {
            // set standard proxy property
            System.setProperty("http.proxyHost", proxyHost);
        }
        else if ((proxyHost = System.getProperty("http.proxyHost")) != null)
        {
            // standard proxy property is set -> just in case some software expects it,
            // use it also for deprecated proxy property
            System.setProperty("proxyHost", proxyHost);
        }
        else if ((proxyHost = System.getProperty("deployment.proxy.http.host")) != null)
        {
            // javaws proxy property is set ->
            // use it also for standard and deprecated proxy property
            System.setProperty("proxyHost", proxyHost);
            System.setProperty("http.proxyHost", proxyHost);
        }
   
        if (proxyPort != null)
        {
            // set standard proxy property
            System.setProperty("http.proxyPort", proxyPort);
        }
        else if ((proxyPort = System.getProperty("http.proxyPort")) != null)
        {
            // standard proxy property is set -> just in case some software expects it,
            // use it also for deprecated proxy property
            System.setProperty("proxyPort", proxyPort);
        }
        else if ((proxyPort = System.getProperty("deployment.proxy.http.port")) != null)
        {
            System.setProperty("proxyPort", proxyPort);
            System.setProperty("http.proxyPort", proxyPort);
        }

        // set nonproxy hosts (deprecated and standard property)
        if (nonProxyHosts == null) nonProxyHosts =
                System.getProperty("http.nonProxyHosts");
        String proxyBypassList = System.getProperty("deployment.proxy.bypass.list");
        if (nonProxyHosts == null && proxyBypassList != null)
        {
            nonProxyHosts = proxyBypassList.replace(';', '|');
        }
       
        nonProxyHosts = updateNonProxyHosts(isProxyEnabled(), nonProxyHosts);
        if (nonProxyHosts != null)
        {
            System.setProperty("nonProxyHosts", nonProxyHosts);
            System.setProperty("http.nonProxyHosts", nonProxyHosts);
            proxyBypassList = nonProxyHosts.replace('|', ';');
            System.setProperty("deployment.proxy.bypass.list", proxyBypassList);
        }