Question

My computer is running behind proxy. I want to access url from JavaFX. for example say i want to show image from a url. But i haven't seen anyway to provide proxy settings for the connection(?). Please if someone can tell me how to do things in such situation? Thanks

Was it helpful?

OTHER TIPS

As link in accepted answer doesn't work anymore I'm adding proxy setting code here:

    System.setProperty("http.proxyHost", "myproxyhost");
    System.setProperty("http.proxyPort", "80");

By default, JavaFX will automatically use your Operating Systems proxy settings, this is controlled via the Java Preferences or Java Control panel icons on your Mac or PC.

You can also set, within Java, the proxy environment variables, but I haven't tried this.

If you are trying to request an external resource from an unsigned application, Java may prompt you (the user) for permission when it runs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top