JDK-8152430 : By using custom fonts the temp files "+JXF[?].tmp" are not removed on exit.
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Affected Version: 8u74
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2016-03-21
  • Updated: 2018-09-06
  • Resolved: 2016-03-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Duplicate :  
Description
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 :
Microsoft Windows [Version 6.1.7601]

A DESCRIPTION OF THE PROBLEM :
By using custom fonts the temp files "+JXF[���].tmp" in "C:\Users\[user]\AppData\Local\Temp" are not removed on exit.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Use a custom font in a application.
2) A temp file "+JXF[���].tmp" will be created in "C:\Users\[user]\AppData\Local\Temp"
3) Exit the application

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The temp file "+JXF[���].tmp" was deleted.
ACTUAL -
The temp file "+JXF[���].tmp" was not deleted.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
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 ----------


Comments
Duplicate of JDK-8152423
25-03-2016