I too have problems running AWT applications using jdk1.2v2 on my 16bpp
display. Unlike you, I can run visual apps at 32bpp (or indeed 8bpp) okay.
I think that I've tracked my problem down to a possible bug in Java. It
seems that sun.awt.image.ShortInterleavedRaster expects the RGB weighting
(i.e. number of bits per colour) to match the depth of the display.
i.e. in 16bpp mode the RGB weighting is usually 565 (i.e. 5 red bits, 6
green bits and 5 blue bits) for a total of 16 bits. However some X servers
(for instance the XFree86 NVidia RIVA128 server that I use) can't cope with
a mixed RGB weighting, so they force the weighting to 555. This means that
these servers have an effective colour depth of 15 bits at 16bpp!
It is this mismatch between colour depth and RGB weighting that appears to
be causing the jdk to crash.
The solution? Use your X server in 15bpp mode rather than 16bpp. This will
appease the jdk, you'll have the same number of colours (32K), and X
performance shouldn't be affected 'cause the X server will still use 16 bits
to store each pixel.
i.e. /usr/X11R6/bin/startx -- -bpp 15
Well, this worked for me! :-)
Good luck,
Simon.
"Henry J. Story" wrote:
>
> I get a similar behavior. When running X with 16bpp I have the same
> error message.
> After starting X with 32 bpp, the SwingSetApplet starts fine, but a lot
> of things are
> not showing up correctly. Nothing is appearing on the tabs apart from
> three pictures:
> a tiger, "Swing!" and the picture of a cow. In fact in looks like no
> text at all is appearing
> anywhere, unless it was originally a picture of a picture (like the
> "Swing!" picture).
>
> I am using Suse 6.0. The jdk1.2 with the glibc2.0 library.
> My video card is Diamond Viper 330, 66Mh AGP card. (with 4MB of RAM I
> believe)
>
> Henry
>
> From: Osvaldo Pinali Doederlein
> -----------------------------------------------------------------------
> I also get this stuff when runnin on 16bpp (RIVA128), or I get
> totally black
> windows, or (what looks like) Java2D initialization errors (e.g.
> MoleculeViewer).... errors about color model mismatch.
>
> When I change to 32bpp all goes well, but then all graphics are
> unbelievably
> slow (a couple orders of magnitude slower than what you'd expect
> from an
> _interpreter_).
>
> For console apps all goes well, though.
>
> Other issue: I tried to build the sources, but I wasn't able to
> find the
> source distribution that the readme mention, I used the
> distribution that's
> available in the SCSL site (jdk1_2-src.tar.gz)... the build goes
> well until
> a it gets errors compiling some Java sources - instantiation of
> abstract
> classes. Is blackdown using some more recent sources???
>
> ----- Original Message -----
> From: Mark Andreas Meyer <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, May 31, 1999 4:19 AM
> Subject: Error loading MetalLookAndFeel/JDK1.2pre2
>
> > Hi.
> > When I4m running Swing programs I4m getting the following:
> >
> > ---snip---
> > $ java -green -Djava.compiler=3D Stylepad
> > Exception in thread "main" java.lang.Error: can't load
> > javax.swing.plaf.metal.MetalLookAndFeel
> > at
> javax.swing.UIManager.initializeDefaultLAF(UIManager.java:826)=
> >
> > at javax.swing.UIManager.initialize(UIManager.java:896)
> > at
> javax.swing.UIManager.maybeInitialize(UIManager.java:913)
> > at javax.swing.UIManager.getUI(UIManager.java:535)
> > at javax.swing.JPanel.updateUI(JPanel.java:110)
> > at javax.swing.JPanel.<init>(JPanel.java:70)
> > at javax.swing.JPanel.<init>(JPanel.java:100)
> > at
> javax.swing.JRootPane.createGlassPane(JRootPane.java:225)
> > at javax.swing.JRootPane.<init>(JRootPane.java:181)
> > at javax.swing.JFrame.createRootPane(JFrame.java:154)
> > at javax.swing.JFrame.frameInit(JFrame.java:147)
> > at javax.swing.JFrame.<init>(JFrame.java:124)
> > at Stylepad.main(Stylepad.java:57)
> > ---snip---
> >
> > ...and nothing happens, so I aborted (Ctrl-C).
> >
> > I had the same problem with JDK1.2pre1 and JDK1.2pre2 on debian
> 2.0, 2.1
> > upgraded from 2.0 and 2.1, and I was not able to find a similar
> behavior
> in
> > the ML archive, nor a note on blackdown.org, so it=B4s propably
> my fault
> :(
> > Looks like a missing Metal.
> >
> > I4m now running Debian 2.1 (recently installed) and JDK1.2pre2.
> The URW
> fonts
> > are intalled...
> >
> > Any ideas?
> >
> > TIA, Mark
> >
> >
> >
> ----------------------------------------------------------------------
> > To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> > with a subject of "unsubscribe". Trouble? Contact
> [EMAIL PROTECTED]
> >
> >
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]