Java 简单的3d代码,抛出异常!
我在互联网上找到了一个代码,但我真的不知道它会抛出这些异常,请帮助我!真的,我需要你的帮助,谢谢Java 简单的3d代码,抛出异常!,java,netbeans,3d,Java,Netbeans,3d,我在互联网上找到了一个代码,但我真的不知道它会抛出这些异常,请帮助我!真的,我需要你的帮助,谢谢 run: java.lang.UnsupportedOperationException: No AudioDevice specified at com.sun.j3d.utils.universe.Viewer.createAudioDevice(Viewer.java:986) at javaapplication17.WrapShooter3D.<ini
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 3D:音频已禁用
线程“main”com.sun.j3d.utils.image.ImageException中的异常:
在第行:
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(); }
throw new IIOException("Can't read input file!");
_原因:javax.imageio.IIOException:无法读取输入文件
在第行:
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(); }
throw new IIOException("Can't read input file!");
TextureLoader stoneTex=新的TextureLoader(“images/stone.jpg”,null)
尝试用文件的完整路径替换“images/stone.jpg”。例如,“c:\abc\efg\images\stone.jpg”。TextureLoader stoneTex=新的TextureLoader(“images/stone.jpg”,空)
尝试用文件的完整路径替换“images/stone.jpg”。例如“c:\abc\efg\images\stone.jpg”。您确定stone.jpg文件位于上述位置吗?您可能想尝试一下absolute path。我创建了一个java应用程序,它的源程序包中有3个包(images/sounds/javaapplication17)。您确定stone.jpg文件在前面提到的相同位置可用吗?您可能想尝试一下绝对路径。我创建了一个java应用程序,它的源程序包中有3个包(image/sounds/javaapplication17)