-
Bug
-
Resolution: Fixed
-
P4
-
8u74, 9
-
x86_64
-
windows_7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8156997 | 8u112 | Philip Race | P4 | Resolved | Fixed | b01 |
FULL PRODUCT VERSION :
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Win 7 x64
A DESCRIPTION OF THE PROBLEM :
Generated temp files (+JXF...temp) for custom fonts not deleted on exit.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached code with font "ARIAL.ttf"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The generated temp font file "[user_home]/AppData/Local/Temp/+JXF....tmp" deleted on exit
ACTUAL -
Temp file not deleted.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error message.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.io.IOException;
import java.io.InputStream;
import javax.naming.ConfigurationException;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class FxFontApplication extends Application {
private static final String fontName = "ARIAL.ttf";
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws ConfigurationException, IOException {
loadFontForFX();
StackPane root = new StackPane();
root.getChildren().add(new Label("Hello Font"));
Scene scene = new Scene(root, 300, 200, javafx.scene.paint.Color.ALICEBLUE);
// No difference with or without css
// scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
}
private void loadFontForFX() throws ConfigurationException, IOException {
InputStream inputStream = FxFontApplication.class.getResourceAsStream(fontName);
javafx.scene.text.Font loadedFont = javafx.scene.text.Font.loadFont(inputStream, -1);
if (loadedFont == null) {
throw new ConfigurationException("Cannot load font for JavaFX from file '" + fontName + "'.");
}
inputStream.close();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No workaround found.
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Win 7 x64
A DESCRIPTION OF THE PROBLEM :
Generated temp files (+JXF...temp) for custom fonts not deleted on exit.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached code with font "ARIAL.ttf"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The generated temp font file "[user_home]/AppData/Local/Temp/+JXF....tmp" deleted on exit
ACTUAL -
Temp file not deleted.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error message.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.io.IOException;
import java.io.InputStream;
import javax.naming.ConfigurationException;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class FxFontApplication extends Application {
private static final String fontName = "ARIAL.ttf";
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws ConfigurationException, IOException {
loadFontForFX();
StackPane root = new StackPane();
root.getChildren().add(new Label("Hello Font"));
Scene scene = new Scene(root, 300, 200, javafx.scene.paint.Color.ALICEBLUE);
// No difference with or without css
// scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
}
private void loadFontForFX() throws ConfigurationException, IOException {
InputStream inputStream = FxFontApplication.class.getResourceAsStream(fontName);
javafx.scene.text.Font loadedFont = javafx.scene.text.Font.loadFont(inputStream, -1);
if (loadedFont == null) {
throw new ConfigurationException("Cannot load font for JavaFX from file '" + fontName + "'.");
}
inputStream.close();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No workaround found.
- backported by
-
JDK-8156997 Generated temp files (+JXF...temp) for custom fonts not deleted on exit.
- Resolved
- duplicates
-
JDK-8152430 By using custom fonts the temp files "+JXF[?].tmp" are not removed on exit.
- Closed
-
JDK-8153382 Generated temp files (+JXF...temp) for custom fonts not deleted on exit.
- Closed
- relates to
-
JDK-8267605 JavaFX temporary font files are not always deleted
- Open
-
JDK-8310725 Temporary font files should be deleted, once the file purpose is served
- Closed