Until Java 8u51, the following worked fine:
- Have an HTML file containing
<script src="javascript.js"></script>
- Load this HTML file into a WebView
- Call a function contained in
javascript.js
usingwebView.getEngine().executeScript()
After switching to 8u60 however, it no longer works:
Exception in thread "JavaFX Application Thread" netscape.javascript.JSException: TypeError: undefined is not a function
So the file javascript.js
is no longer loaded. It works when started from an IDE, where JavaScript file just lies on the file system. However, it no longer works when the application is packaged and therefore javascript.js
is inside a JAR file.
Any idea what has changed and how this can be fixed?