Hi I have found some code about 3d game but really I can not get why it throws such an exception please help me thanks
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 javaapplication16.Grabbers.loadTexture(Grabbers.java:116)
at javaapplication16.Grabbers.<init>(Grabbers.java:99)
at javaapplication16.WrapArms3D.addGrabbers(WrapArms3D.java:162)
at javaapplication16.WrapArms3D.createSceneGraph(WrapArms3D.java:82)
at javaapplication16.WrapArms3D.<init>(WrapArms3D.java:64)
at javaapplication16.Arms3D.<init>(Arms3D.java:28)
at javaapplication16.Arms3D.main(Arms3D.java:41)
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
THESE are the lines that caused the program to throws exception:
TextureLoader texLoader = new TextureLoader(fn, null);
Texture2D tex = loadTexture(TEX_FNM); // used by both grabbers
Grabbers grabbers = new Grabbers( new Vector3f(0,0,3), 1.0f);
addGrabbers();
createSceneGraph();
WrapArms3D w3d = new WrapArms3D();
{ new Arms3D(); }