The problem is caused by the JDK bug.
Solution: trace down and uninstall offending font file.
You can use the following code to find font which is causing the crash:
import java.awt.Font;
import java.awt.GraphicsEnvironment;
public class FontTest {
public static void main(String[] args) {
Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
for (int i = 0; i < fonts.length; i++) {
final Font font = fonts+;
final String name = font.getName();
System.out.print("Checking Font: " + name);
if (font.canDisplay('a') &&
font.canDisplay('z') &&
font.canDisplay('A') &&
font.canDisplay('Z') &&
font.canDisplay('0') &&
font.canDisplay('1')) {
System.out.println(" OK.");
} else {
System.out.println();
}
}
}
}
Save this code into FontTest.java file, then compile and run it:
javac FontTest.java
java FontTest
You should see the list of fonts in the console. When this sample crashes, the last font printed in the console is the one causing the problem. Find it on your system and uninstall. Then try to run the sample again and remove other fonts if necessary until it runs without a crash.
There are no comments on this document