-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
8u60
-
x86_64
-
windows_7
FULL PRODUCT VERSION :
java version "1.08.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) Client VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft windows [version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
I've been attempting to use JavaFX's WebView and WebEngine elements to load My local html page. It's works fine with 1.8 u50,but when I update the jdk to 1.8 u60,I got this error: "ReferenceError: Can't find variable:" .
I have found a same issue on the internet.
http://www.jotform.com/answers/670475-Unable-to-load-Submissions-Page-due-to-JavaScript-Errors-when-Using-JavaFX-WebView-and-WebEngine/?entrymessage=10732640770
So ,I wonder if it's the jdk1.8 u60's bug?
I load my html file with webview :
WD_webView.getEngine().load(this.getClass().getResource("html/my.html").toExternalForm());
and the html is like this:
<!doctype html>
<html>
<head>
<title>CodeMirror: merge view demo</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../css/docs.css">
<link rel=stylesheet href="../css/codemirror.css">
<link rel=stylesheet href="../css/merge.css">
<script src="../js/codemirror.js"></script>
<script src="../js/diff_match_patch.js"></script>
<script src="../js/merge.js"></script>
<script src="../js/mode/clike.js"></script>
</head>
<body>
<div id=view></div>
<script type="text/javascript">
var value, orig1, orig2, dv, panes = 2, highlight = true, connect = null, collapse = false;
function initUI() {
if (value == null)
return;
var target = document.getElementById("view");
target.innerHTML = "";
dv = CodeMirror.MergeView(target, {
value : orig1,
origLeft : panes == 3 ? orig1 : null,
orig : orig2,
lineNumbers : true,
mode : "text/xsrc-c",
highlightDifferences : highlight,
connect : connect,
collapseIdentical : collapse,
revertButtons : false,
readOnly : true
});
}
window.onload = function() {
value = document.documentElement.innerHTML;
orig1 = "test ";
orig2 = "test2";
initUI();
};
</script>
</body>
</html>
the jses and csses are put in the relative directorys.
REGRESSION. Last worked in version 8u60
ADDITIONAL REGRESSION INFORMATION:
java version "1.08.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) Client VM (build 25.60-b23, mixed mode)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
use jdk1.8 u50 webview load html ,js(CodeMirror) wroks fine;
use jdk1.8 u50 webview load html ,get ReferenceError: Can't find variable: CodeMirror.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
ReferenceError: Can't find variable: CodeMirror.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
use webview load local html file:
WD_webView.getEngine().load(this.getClass().getResource("html/my.html").toExternalForm());
html file:
<!doctype html>
<html>
<head>
<title>CodeMirror: merge view demo</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../css/docs.css">
<link rel=stylesheet href="../css/codemirror.css">
<link rel=stylesheet href="../css/merge.css">
<script src="../js/codemirror.js"></script>
<script src="../js/diff_match_patch.js"></script>
<script src="../js/merge.js"></script>
<script src="../js/mode/clike.js"></script>
</head>
<body>
<div id=view></div>
<script type="text/javascript">
var value, orig1, orig2, dv, panes = 2, highlight = true, connect = null, collapse = false;
function initUI() {
if (value == null)
return;
var target = document.getElementById("view");
target.innerHTML = "";
dv = CodeMirror.MergeView(target, {
value : orig1,
origLeft : panes == 3 ? orig1 : null,
orig : orig2,
lineNumbers : true,
mode : "text/xsrc-c",
highlightDifferences : highlight,
connect : connect,
collapseIdentical : collapse,
revertButtons : false,
readOnly : true
});
}
window.onload = function() {
value = document.documentElement.innerHTML;
orig1 = "test ";
orig2 = "test2";
initUI();
};
</script>
</body>
</html>
html Directory:
--js
|_codemirror.js
|_diff_match_patch.js
|_merge.js
|_mode
|_clike.js
--html
|_my.html
--css
|_codemirror.css
|_merge.css
|_docs.css
---------- END SOURCE ----------
java version "1.08.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) Client VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft windows [version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
I've been attempting to use JavaFX's WebView and WebEngine elements to load My local html page. It's works fine with 1.8 u50,but when I update the jdk to 1.8 u60,I got this error: "ReferenceError: Can't find variable:" .
I have found a same issue on the internet.
http://www.jotform.com/answers/670475-Unable-to-load-Submissions-Page-due-to-JavaScript-Errors-when-Using-JavaFX-WebView-and-WebEngine/?entrymessage=10732640770
So ,I wonder if it's the jdk1.8 u60's bug?
I load my html file with webview :
WD_webView.getEngine().load(this.getClass().getResource("html/my.html").toExternalForm());
and the html is like this:
<!doctype html>
<html>
<head>
<title>CodeMirror: merge view demo</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../css/docs.css">
<link rel=stylesheet href="../css/codemirror.css">
<link rel=stylesheet href="../css/merge.css">
<script src="../js/codemirror.js"></script>
<script src="../js/diff_match_patch.js"></script>
<script src="../js/merge.js"></script>
<script src="../js/mode/clike.js"></script>
</head>
<body>
<div id=view></div>
<script type="text/javascript">
var value, orig1, orig2, dv, panes = 2, highlight = true, connect = null, collapse = false;
function initUI() {
if (value == null)
return;
var target = document.getElementById("view");
target.innerHTML = "";
dv = CodeMirror.MergeView(target, {
value : orig1,
origLeft : panes == 3 ? orig1 : null,
orig : orig2,
lineNumbers : true,
mode : "text/xsrc-c",
highlightDifferences : highlight,
connect : connect,
collapseIdentical : collapse,
revertButtons : false,
readOnly : true
});
}
window.onload = function() {
value = document.documentElement.innerHTML;
orig1 = "test ";
orig2 = "test2";
initUI();
};
</script>
</body>
</html>
the jses and csses are put in the relative directorys.
REGRESSION. Last worked in version 8u60
ADDITIONAL REGRESSION INFORMATION:
java version "1.08.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) Client VM (build 25.60-b23, mixed mode)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
use jdk1.8 u50 webview load html ,js(CodeMirror) wroks fine;
use jdk1.8 u50 webview load html ,get ReferenceError: Can't find variable: CodeMirror.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
ReferenceError: Can't find variable: CodeMirror.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
use webview load local html file:
WD_webView.getEngine().load(this.getClass().getResource("html/my.html").toExternalForm());
html file:
<!doctype html>
<html>
<head>
<title>CodeMirror: merge view demo</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../css/docs.css">
<link rel=stylesheet href="../css/codemirror.css">
<link rel=stylesheet href="../css/merge.css">
<script src="../js/codemirror.js"></script>
<script src="../js/diff_match_patch.js"></script>
<script src="../js/merge.js"></script>
<script src="../js/mode/clike.js"></script>
</head>
<body>
<div id=view></div>
<script type="text/javascript">
var value, orig1, orig2, dv, panes = 2, highlight = true, connect = null, collapse = false;
function initUI() {
if (value == null)
return;
var target = document.getElementById("view");
target.innerHTML = "";
dv = CodeMirror.MergeView(target, {
value : orig1,
origLeft : panes == 3 ? orig1 : null,
orig : orig2,
lineNumbers : true,
mode : "text/xsrc-c",
highlightDifferences : highlight,
connect : connect,
collapseIdentical : collapse,
revertButtons : false,
readOnly : true
});
}
window.onload = function() {
value = document.documentElement.innerHTML;
orig1 = "test ";
orig2 = "test2";
initUI();
};
</script>
</body>
</html>
html Directory:
--js
|_codemirror.js
|_diff_match_patch.js
|_merge.js
|_mode
|_clike.js
--html
|_my.html
--css
|_codemirror.css
|_merge.css
|_docs.css
---------- END SOURCE ----------