-
Bug
-
Resolution: Duplicate
-
P3
-
8u60
-
x86_64
-
windows_7
FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
When application load html file from the jar, and html file contains links to other files in the jar (like css or javascripts), that other files are not loaded.
This was working fine in previous Jave versions.
REGRESSION. Last worked in version 8u51
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
WebViewTest .java
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class WebViewTest extends Application {
@Override
public void start(Stage primaryStage) {
WebView browser = new WebView();
WebEngine engine = browser.getEngine();
engine.load(this.getClass().getResource("/index.html").toExternalForm());
final Scene scene = new Scene(browser, 800, 650);
primaryStage.setScene(scene);
primaryStage.show();
}
index.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="main.css" />
</head>
<body>
<div class="test">TEST CSS</div>
</body>
</html>
main.css
.test {
color: red;
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Move other resources to external location.
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
When application load html file from the jar, and html file contains links to other files in the jar (like css or javascripts), that other files are not loaded.
This was working fine in previous Jave versions.
REGRESSION. Last worked in version 8u51
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
WebViewTest .java
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class WebViewTest extends Application {
@Override
public void start(Stage primaryStage) {
WebView browser = new WebView();
WebEngine engine = browser.getEngine();
engine.load(this.getClass().getResource("/index.html").toExternalForm());
final Scene scene = new Scene(browser, 800, 650);
primaryStage.setScene(scene);
primaryStage.show();
}
index.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="main.css" />
</head>
<body>
<div class="test">TEST CSS</div>
</body>
</html>
main.css
.test {
color: red;
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Move other resources to external location.
- duplicates
-
JDK-8136466 [regression] [WebView] Load single page application from jar
- Resolved