1

尽可能简单:

public class WebViewSample extends Application {

    public static void main(String[] args) {
            // I tried without this proxy configuration, same result.
        System.getProperties().put("proxySet", "true");
        System.getProperties().put("proxyHost", "http://127.0.0.1");
        System.getProperties().put("proxyPort", 5677);
        launch(args);
    }

    @Override
    public void start(final Stage primaryStage) {
        final WebView webView = new WebView();
        webView.getEngine().load("http://docs.oracle.com/javafx/");
        primaryStage.setScene(new Scene(webView));
        primaryStage.show();
    }
}

cntlm用来处理代理身份验证。(我正在跑步jdk8u5)。

怎么了 ?

4

1 回答 1

0

配置https解决了这个问题。

System.setProperty("https.proxyHost", "127.0.0.1");
System.setProperty("https.proxyPort", "5677");
于 2014-06-01T21:40:08.230 回答