Back to The AWT in 1.0 and 1.1
Workarounds for Known AWT Bugs
This page describes workarounds for some AWT bugs
(well, just one, for now).
To see a list of the 1.1 AWT bugs,
go to the
known bugs
page.
Bugs discussed on this page:
- 4033523:
Solaris JDK fails when displayed on non-Solaris X11 servers
with JDK1.1fcs.
If you're running a Java program on Solaris
(probably displaying it on a non-Sun X server)
and you see a horrible error message
(bus error, for example),
suspect bug 4033523.
Solaris JDK fails when displayed on non-Solaris X11 servers
with JDK1.1fcs.
The Problem
In the Solaris implementation between JDK1.1 beta3 and FCS,
we changed the way
we deal with accessing fonts at the native level.
Now when we try to open a font which doesn't exist on the X server,
we throw a NullPointerException instead of ignoring the failure
(which previously generated an X error complaining about the font
and left a null pointer lying around).
This problem is most likely
to occur on non-Sun X server implementations,
such as X terminals or Linux.
A little background:
For 1.1, the default font set used by the toolkit is now defined in
an external properties file named lib/font.properties.
This file exists so that it's easy
to tailor the set appropriate for a given system
(and in particular, to appropriately support internationalization).
The NullPointerException is caused when a font listed
in this file cannot
be found on the X server the java runtime is displaying to.
The Workaround
You can work around this problem in one of two ways:
- Simply remove the
lib/font.properties file
This will cause the toolkit to execute an iso-latin1-only code path,
which defaults to only a very basic font set available on most
X servers. This option should be used only if you do not care about
dealing with non-latin1 text output.
- Modify the
lib/font.properties file
to contain only fonts available
on your X server so that there are no unresolved font references.
Back to The AWT in 1.0 and 1.1
|