Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Let's say if I write such an absolute path, then it works, what should I do?
<script src="jar:file:/C:/Users/kirawa/Documents/NetBeansProjects/shoping-fx/target/shoping-fx-1.0-SNAPSHOT.jar!/html/jquery-ui.js"></script>
in general, if the html file is in a jar, then to install external styles and scripts, you need to specify the full absolute path to the files.
It is better to do this: load a file not from a jar into the webview, in which case everything will work as it should. Those. paths to scripts and styles can be specified relative (relative to index.html).
instead of a line
add
try {
webEngine.load(new File("html/index.html").toURI().toURL().toExternalForm());
} catch (IOException e) {
e.printStackTrace();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question