开发者

simple 3d code which throws exception!

开发者 https://www.devze.com 2022-12-21 11:04 出处:网络
I have found a code in the internet but really I don\'t know that for what it throws these exceptions,please help me !really I need your help thanks.

I have found a code in the internet but really I don't know that for what it throws these exceptions,please help me !really I need your help thanks.

run:
java.lang.UnsupportedOperationException: No AudioDevice specified
        at com.sun.j3d.utils.universe.Viewer.createAudioDevice(Viewer.java:986)
        at javaapplication17.WrapShooter3D.<init>(WrapShooter3D.java:54)
        at javaapplication17.Shooter3D.<init>(Shooter3D.java:25)
        at javaapplication17.Shooter3D.main(Shooter3D.java:38)
    Java 3D: audio is disabled
    Exception in thread "main" com.sun.j3d.utils.image.ImageException: javax.imageio.IIOException: Can't read input file!
        at com.sun.j3d.utils.image.TextureLoader$1.run(TextureLoader.java:344)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.j3d.utils.image.TextureLoader.<init>(TextureLoader.java:337)
        at com.sun.j3d.utils.image.TextureLoader.<init>(TextureLoader.java:291)
        at javaapplication17.GunTurret.stoneApp(GunTurret.java:58)
        at javaapplication17.GunTurret.<init>(GunTurret.java:43)
        at javaapplication17.WrapShooter3D.makeGun(WrapShooter3D.java:167)
        at javaapplication17.WrapShooter3D.createSceneGraph(WrapShooter3D.java:79)
        at javaapplication17.WrapShooter3D.<init>(WrapShooter3D.java:56)
        at javaapplication17.Shooter3D.<init>(Shooter3D.java:25)
        at javaapplication17.Shooter3D.main(Shooter3D.java:38)
    Caused by: javax.imageio.IIOException: Can't read input file!
        at javax.imageio.ImageIO.read(ImageIO.java:1275)
        at com.sun.j3d.utils.image.TextureLoader$1.run(TextureLoader.java:342)
        ... 10 more

_ java.lang.UnsupportedOperationException: No AudioDevice s开发者_如何学运维pecified

at lines:

 AudioDevice audioDev = su.getViewer().createAudioDevice();
    WrapShooter3D w3d = new WrapShooter3D();
    javax.imageio.IIOException: Can't read input file!
    { new Shooter3D(); }

_ Java 3D: audio is disabled Exception in thread "main" com.sun.j3d.utils.image.ImageException:

at lines:

 TextureLoader stoneTex = new TextureLoader("images/stone.jpg", null);
 Appearance apStone = stoneApp();
 GunTurret gun = new GunTurret(startVec);
 makeGun(canvas3D);
 createSceneGraph(canvas3D);
 WrapShooter3D w3d = new WrapShooter3D();
 { new Shooter3D(); }

_ Caused by: javax.imageio.IIOException: Can't read input file!

at lines:

throw new IIOException("Can't read input file!");


TextureLoader stoneTex = new TextureLoader("images/stone.jpg", null);

Try replace "images/stone.jpg" with the full path to the file. Eg. "c:\abc\efg\images\stone.jpg".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号