------ =_NextPart_001_01C0BCF7.A076022A
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
The links works fine for me too.... though I did notice in the
exceptions that you are using jdk1.2??=A0 I am using 1.3.0_02.=A0 =
Perhaps
upgrading to 1.3 will do the trick.
=A0
-Lee
-----Original Message-----
From: Ahmed Shakil [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 03, 2001 4:06 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] texture images in an applet
Ok guys, I am getting the following error when I try to run this applet
through the web. It works fine if I run it from dos prompt or my local
drive as an applet.
=A0
Link to my site is
http://www.geocities.com/ahmedbinshakil/Kawa/album.html
=A0
Uncaught error fetching image:
java.lang.NullPointerException
=A0at =
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
=A0at
sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown
Source)
=A0at =
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown
Source)
=A0at
sun.plugin.protocol.jdk12.http.HttpURLConnection.checkCookieHeader(Unkno=
wn Source)
=A0at
sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown
Source)
=A0at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
=A0at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
=A0at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
=A0at sun.awt.image.ImageFetcher.run(Unknown Source)
=A0
=A0
and my code looks like this: -
=A0
=A0 final String texFile =3D "./floor1.jpg";
=A0=A0Appearance app =3D new Appearance();
=A0=A0TextureLoader loader =3D null;
=A0=A0if (m_bApplet) {
=A0=A0=A0try {
=A0=A0=A0=A0loader =3D new TextureLoader( new URL(getCodeBase(), =
texFile), this);
=A0=A0=A0}
=A0=A0=A0catch (MalformedURLException e) {
=A0=A0=A0=A0m_acontext.showStatus("texture image not found");
=A0=A0=A0=A0e.printStackTrace();
=A0=A0=A0}
=A0=A0}
=A0=A0else
=A0=A0=A0loader =3D new TextureLoader( texFile, this );
=A0
=A0=A0if ( loader!=3Dnull ) app.setTexture(loader.getTexture());
=A0
any ideas???
=A0
Ahmed
------ =_NextPart_001_01C0BCF7.A076022A
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><SPAN class=3D305592211-04042001><FONT face=3DArial =
color=3D#0000ff size=3D2>The=20
links works fine for me too.... though I did notice in the exceptions =
that you=20
are using jdk1.2?? I am using 1.3.0_02. Perhaps upgrading =
to 1.3=20
will do the trick.</FONT></SPAN></DIV>
<DIV><SPAN class=3D305592211-04042001><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305592211-04042001><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>-Lee</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Ahmed Shakil=20
[mailto:[EMAIL PROTECTED]]<BR><B>Sent:</B> Tuesday, April 03, =
2001=20
4:06 PM<BR><B>To:</B> [EMAIL PROTECTED]<BR><B>Subject:</B> =
[JAVA3D]=20
texture images in an applet<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D875550020-03042001>Ok =
guys, I am=20
getting the following error when I try to run this applet through the =
web. It=20
works fine if I run it from dos prompt or my local drive as an=20
applet.</SPAN></FONT></DIV>
<DIV><SPAN class=3D875550020-03042001></SPAN> </DIV>
<DIV><FONT color=3D#0000ff><SPAN class=3D875550020-03042001><FONT =
face=3DArial=20
color=3D#000000 size=3D2>Link to my site is </FONT><A=20
=
href=3D"http://www.geocities.com/ahmedbinshakil/Kawa/album.html"><FONT=20
face=3DArial=20
=
size=3D2>http://www.geocities.com/ahmedbinshakil/Kawa/album.html</FONT><=
/A></SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D875550020-03042001></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
class=3D875550020-03042001>Uncaught error fetching =
image:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
=
class=3D875550020-03042001>java.lang.NullPointerException</SPAN></FONT><=
/DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
class=3D875550020-03042001> at=20
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown=20
Source)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
class=3D875550020-03042001> at=20
=
sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown =
Source)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
class=3D875550020-03042001> at=20
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown=20
Source)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
class=3D875550020-03042001> at=20
=
sun.plugin.protocol.jdk12.http.HttpURLConnection.checkCookieHeader(Unkno=
wn=20
Source)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
class=3D875550020-03042001> at=20
=
sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown =
Source)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
class=3D875550020-03042001> at=20
sun.awt.image.URLImageSource.getDecoder(Unknown =
Source)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
class=3D875550020-03042001> at=20
sun.awt.image.InputStreamImageSource.doFetch(Unknown=20
Source)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
class=3D875550020-03042001> at =
sun.awt.image.ImageFetcher.fetchloop(Unknown=20
Source)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2><SPAN=20
class=3D875550020-03042001> at =
sun.awt.image.ImageFetcher.run(Unknown=20
Source)</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D875550020-03042001></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D875550020-03042001>and =
my code looks=20
like this: -</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D875550020-03042001></SPAN></FONT> </DIV>
<DIV><FONT color=3D#0000ff size=3D2><SPAN =
class=3D875550020-03042001><STRONG><FONT=20
face=3D"Courier New"> final String texFile =3D =
"./floor1.jpg";<BR><FONT=20
face=3DArial>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D875550020-03042001><STRONG> Appearance app =3D new =
Appearance();</STRONG></SPAN></FONT></DIV></FONT><BR></FONT><FONT=20
face=3D"Courier New"></STRONG><STRONG> TextureLoader =
loader =3D=20
null;<BR> if (m_bApplet) {<BR> try=20
{<BR> loader =3D new TextureLoader( new=20
URL(getCodeBase(), texFile),=20
this);<BR> }<BR> catch=20
(MalformedURLException e)=20
{<BR> m_acontext.showStatus("texture image not =
=
found");<BR> e.printStackTrace();<BR> =
}<BR> }<BR> else<BR> loader=
=20
=3D new TextureLoader( texFile, this =
);</STRONG></FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff =
size=3D2><STRONG><SPAN=20
class=3D875550020-03042001> if ( loader!=3Dnull )=20
app.setTexture(loader.getTexture());<BR></SPAN></STRONG></FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D875550020-03042001></SPAN></FONT> </DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D875550020-03042001><FONT face=3DArial>any=20
ideas???</FONT></SPAN></FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D875550020-03042001></SPAN></FONT> </DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D875550020-03042001><FONT=20
face=3DArial>Ahmed</FONT></DIV></BLOCKQUOTE></SPAN></FONT></BODY></HTML>=
------ =_NextPart_001_01C0BCF7.A076022A--
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".