sun.io.CharToByteUTF-8 problems in old Netscape VM?
From: Tom Swiss (tms_at_infamous.net)
Date: 06/25/04
- Previous message: Jim Sculley: "Re: \n troubles"
- Next in thread: Andrew Thompson: "Re: sun.io.CharToByteUTF-8 problems in old Netscape VM?"
- Reply: Andrew Thompson: "Re: sun.io.CharToByteUTF-8 problems in old Netscape VM?"
- Reply: Roedy Green: "Re: sun.io.CharToByteUTF-8 problems in old Netscape VM?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 24 Jun 2004 20:27:00 -0400
I'm a Java newbie, so please pardon if I'm missing something
glaringly obvious. But I've done some Googling and haven't been able to
figure out what's going on.
I'm trying to write a Java applet for image display. No big deal,
seems like a nice first Java project. I'm using the 1.4.1 SDK on Linux
with the "target=1.1" option to javac to try and make it work with old
browsers (our target demographic is likely to have older boxes and
machines). Which makes me use AWT instead of Swing and makes the applet
ugly, but c'est la vie.
The applet loads fine in my browser (using the 1.4.1 JRE plugin)
and I'm told it loads ok in IE 5.5's built-in 1.1 VM. However, when
using old versions of Netscape, I get an ExceptionInInitializerError
exception with getException().getMessage() as "sun.io.CharToByteUTF-8".
The exception is thrown when I try to get the InputStream from a
URLConnection; however, I'm able to get the ContentLength and
ContentType from the URLConnection without a problem, so I know it's
opening and reading from the TCP connection.
URL u=new URL(getCodeBase() + "image.bin");
debug(u.toString());
URLConnection uc=u.openConnection();
debug (uc.toString());
uc.connect();
int filesize=uc.getContentLength();
debug (filesize);
// ContentType is application/octet-stream
debug (uc.getContentType());
// exeption thrown here...
InputStream rawstream=uc.getInputStream();
My Googling leads me to the impression that there's a bug in the
Netscape 4.7x VM regarding the class name, something like
sun.io.CharToByteUTF-8 versus sun.io.CharToByteUTF8?
Can anyone tell me more about this? Any work-arounds (besides
getting people to upgrade their browser?) or suggestions? Much gratitude
for any assistance.
===Tom Swiss/tms(at)infamous.net===http://www.infamous.net==="Born to die"===
"What's so funny about peace, love, and understanding?" - Nick Lowe
"Power to the Peaceful" - Michael Franti
- Previous message: Jim Sculley: "Re: \n troubles"
- Next in thread: Andrew Thompson: "Re: sun.io.CharToByteUTF-8 problems in old Netscape VM?"
- Reply: Andrew Thompson: "Re: sun.io.CharToByteUTF-8 problems in old Netscape VM?"
- Reply: Roedy Green: "Re: sun.io.CharToByteUTF-8 problems in old Netscape VM?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|