I have simple app with code:
webView.getEngine().load(\"classpath:data/index.html\");
Custom URLStreamHandler:
public class
I thin I found the solution:
in Handler.openConnection(URL u)
we have to add
String path = getURL().getPath().startsWith("/") ? getURL().getPath().substring(1) : getURL().getPath();
URL resourceUrl = classLoader.getResource(path);
instead of
URL resourceUrl = classLoader.getResource(u.getPath());
and to standartize URL, instead
webView.getEngine().load("classpath:data/index.html");
use
webView.getEngine().load("classpath:///data/index.html");