Why .jar executable doesn't load web view in javafx (java)?

450 Views Asked by At

My project contains a WebView with html and JS resources. When I launch my .jar file, the WebView remains blank, instead of showing a JS map.

Java Code for loading the html:

bridge  = BridgeSingleton.getInstance();
WebEngine engine = webviewmap.getEngine();
URL urlHello = getClass().getResource("/map/map.html");
engine.load(urlHello.toExternalForm());

The html and JS files are stored in "resources" folder. When the program is launched in Eclipse, it works fine, but not in .jar version.

Any idea about the issue?

1

There are 1 best solutions below

0
On

The problem is resolved: it was an issue with the geoIp API.