Afternoon all,

I'm wondering if anyone can shed any light on why I can't load a really simple .wrl 
file in using a VRML97Loader. I'm not really very up on VRML and it's relationship 
with Java3D, so I am quite possibly being entirely lame here, but the code I have is 
like this:


     VRML97Loader l = new VRML97Loader( VRML97Loader.LOAD_ALL);

            try 
            {
                FileReader f = new FileReader(fileName);

                    Scene s = l.load(f);
                BranchGroup b = s.getSceneGroup();
                Shape3D v = (Shape3D) b.getChild(0);
                this.setGeometry(v.getGeometry());
            }
            catch (FileNotFoundException e) {
        
        // and so on.

The problem I get is that when I try to load it I get a nullPointerException from the 
l.load(f) method that looks a bit like this:

java.lang.NullPointerException
        at org.web3d.j3d.loaders.BaseLoader.load(BaseLoader.java:196)

Can anyone who has dealt with this before let me know what I'm doing wrong?

If I hand it the filename directly I get this:

org.ietf.uri.UnsupportedServiceException: file is not supported
        at org.ietf.uri.URL.getResource(URL.java:472)
        at org.web3d.vrml.sav.InputSource.getCharacterStream(InputSource.java:158)

Any suggestions?

-ben

==========================================================================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".

Reply via email to