You can choose between different version of Java with `(sudo) update-alternatives -config java'.
The default `gcj' Java is missing several components. Look for packages starting with `gcj6' or `gcj7', some people have success after installing the development packages. Anyway, after installing Sun Java (1.5) and Blackdown Java (1.4) I completely removed gcj Java. Note that SunJava is not `free', and so is not provided on the Xubuntu install CD.
Java in many Debian distributions is unable to cope with certain fonts. The following error can be seen in programs like `BibleDesktop' when run with Blackdown Java 1.4. `BibleDesktop' starts, but fails when the menu item `Tools -- Options' is selected...
Unexpected Signal : 11 occurred at PC=0xAACBC56F
Function=(null)
Library=/usr/lib/j2se/1.4/jre/lib/i386/libfontmanager.so
import java.awt.GraphicsEnvironment;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingUtilities;
public class FontTest {
public static void main(String[] args) {
final JFrame frame = new JFrame(Font test window);
frame.setSize(800, 600);
frame.getContentPane().setLayout(new BorderLayout());
final JLabel label = new JLabel(The quick brown fox jumped over the lazy dog's back! +
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +
@#$%^&*()_+-=,./<>?'\;:[{]}\\|`~);
label.setFont(label.getFont().deriveFont(16.0f));
frame.getContentPane().add(label, BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
try {
final Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
for (int i = 0; i < fonts.length; i++) {
final int idx = i;
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
final Font font = fonts[idx];
final String name = font.getName();
System.out.println(Checking Font: + name);
final boolean t1 = testChars(font, 'a', 'z');
final boolean t2 = testChars(font, 'A', 'Z');
final boolean t3 = testChars(font, '0', '9');
System.out.println(Executing canDisplayUpTo...);
final boolean t4 = font.canDisplayUpTo(The quick brown fox jumped over the lazy dog's back!@#$%^&*()_+-=,./<>?'\;:[{]}\\|`~) == -1;
System.out.println(Executing printTest...);
printTest(frame, label, font);
if (t1 && t2 && t3 && t4) {
System.out.println( OK.);
} else {
System.out.println();
}
}
});
}
System.out.println(Finished);
System.exit(0);
} catch(Exception e) {
throw new RuntimeException(e);
}
}
private static boolean testChars(final Font font, final int start, final int end)
{
System.out.println(testChars(' + (char)start + ', ' + (char)end + '));
boolean ret = true;
for(int i = start;i <= end;i++) {
if(!font.canDisplay((char)i)) {
ret = false;
}
}
return ret;
}
private static void printTest(final JFrame frame, final JLabel label, final Font font)
{
System.out.println(Entering printTest.);
final Font derived = font.deriveFont(16.0f);
System.out.println(Derived font);
label.setFont(derived);
System.out.println(Set font);
frame.repaint();
System.out.println(Repainted and leaving printTest.);
}
}
Fonts I removed...