Hello!
Using the URL instead of regular file access did help. When thinking about
it, it really is weird that it worked in Netscape, particularily because
both were running it with the Plug-In. I ended up using:
TextureLoader texLoader = new
TextureLoader(getClass().getResource("checkered.gif"),this);
which also lets me store the image in a JAR file.
Thanks for your help.
Kind regards
--
Damir Arh
http://damir.gajba.net
----- Original Message -----
From: "J. Lee Dixon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 12, 2000 3:11 PM
Subject: Re: [JAVA3D] Loading images with Java Plug-In in Internet Explore r
> Well, we know the texture loader works in IE... there is nothing obvious
> from your code snippet... although, the stack trace says it is in
> "TextureLoader.getTexture()", which you call on line 72. Sounds more
> like it's dying at line 72 because it is not finding the texture....
> actually, you are attempting to load the texture by doing file access.
> Normally, this type of access is restricted to applets. I would think
> your code should look more like:
>
> URL texURL = new URL(getDocumentBase(), "checkered.gif");
> TextureLoader texLoader = new TextureLoader(texURl, this);
>
> Maybe in Netscape it is allowing the access to files, whereas IE is
> not.... I wouldn't think it would make a difference since both are
> running in the Java Plug-in. (You did run your HTML through the
> HTMLConverter, right??)
>
> -Lee
>
> -----Original Message-----
> From: Damir Arh [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 12, 2000 8:48 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] Loading images with Java Plug-In in Internet
> Explorer
>
>
> Hello!
>
> Yes, sure. I just wasn't attaching it as it works fine everywhere else
> except in IE so I thought it's not a matter of code. Anyway, it's
> nothing
> special, just using the TextureLoader to get the file.
>
> 71: TextureLoader texLoader = new TextureLoader("checkered.gif",this);
> 72: app.setTexture((Texture2D) texLoader.getTexture());
>
> Kind regards
> --
> Damir Arh
> http://damir.gajba.net
>
> ----- Original Message -----
> From: "J. Lee Dixon" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, October 12, 2000 12:59 PM
> Subject: Re: [JAVA3D] Loading images with Java Plug-In in Internet
> Explore r
>
>
> > Can't tell what is going on just by seeing the stack dump; how about
> > showing a code snippet around line 71 of your Boing applet....
> >
> > -----Original Message-----
> > From: Damir Arh [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, October 12, 2000 5:12 AM
> > To: [EMAIL PROTECTED]
> > Subject: [JAVA3D] Loading images with Java Plug-In in Internet
> Explorer
> >
> >
> > Hello!
> >
> > I've written a small applet which uses textures with Java3D. This
> applet
> > is displayed fine in Netscape and in the AppletViewr but it fails in
> > Internet Explorer with the following error:
> >
> > Error: in loading image
> > java.lang.NullPointerException
> > at com.sun.j3d.utils.image.TextureLoader.getTexture(Compiled Code)
> > at Boing.createSceneGraph(Boing.java:71)
> > at Boing.<init>(Boing.java:122)
> > at java.lang.Class.newInstance0(Native Method)
> > at java.lang.Class.newInstance(Compiled Code)
> > at sun.applet.AppletPanel.createApplet(AppletPanel.java:532)
> > at sun.plugin.AppletViewer.createApplet(Unknown Source)
> > at sun.applet.AppletPanel.runLoader(AppletPanel.java:468)
> > at sun.applet.AppletPanel.run(Compiled Code)
> > at java.lang.Thread.run(Thread.java:479)
> >
> > How come IE can't load the image file while the other two 'browsers'
> > can. Is this a security issue or something else?
> >
> > Kind regards
> > --
> > Damir Arh
> > http://damir.gajba.net
===========================================================================
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".