tags:

views:

88

answers:

1

I need Vecmath, so I went to Oracle to get the latest version of Java 3D. I didn't see a place to download a JAR, but it had an installer. I downloaded and ran it. I assume that the installer added the JAR as a JDK extension

I restarted Eclipse, and it sees that VecMath is present. However, it still complains:

Access restriction: The type Vector3f is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\ext\vecmath.jar

Bummer. I am able to change it from a compiler error to a warning, but it crashes as soon as I try to run it. Although, I'm using this in conjunction with OpenGL, and the crash could have nothing to do with vecmath. I'm not sure. Here is the exception:

Exception in thread "Timer-0" javax.media.opengl.GLException: java.lang.RuntimeException: javax.imageio.IIOException: Can't read input file!
    at com.jogamp.opengl.impl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:101)
    at com.jogamp.opengl.impl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:192)
    at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:164)
    at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:591)
    at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:301)
    at com.jogamp.opengl.util.AnimatorImpl.display(AnimatorImpl.java:50)
    at com.jogamp.opengl.util.Animator.display(Animator.java:154)
    at com.jogamp.opengl.util.FPSAnimator$1.run(FPSAnimator.java:95)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)
Caused by: java.lang.RuntimeException: javax.imageio.IIOException: Can't read input file!
    at cs4620.nth23.assignment1.GraphicsApp.loadTextures(GraphicsApp.java:98)
    at cs4620.nth23.assignment1.GraphicsApp.init(GraphicsApp.java:65)
    at com.jogamp.opengl.impl.GLDrawableHelper.init(GLDrawableHelper.java:111)
    at com.jogamp.opengl.impl.GLDrawableHelper.init(GLDrawableHelper.java:124)
    at javax.media.opengl.awt.GLCanvas$InitAction.run(GLCanvas.java:643)
    at com.jogamp.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:273)
    at javax.media.opengl.awt.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:674)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: javax.imageio.IIOException: Can't read input file!
    at javax.imageio.ImageIO.read(Unknown Source)
    at cs4620.nth23.assignment1.GraphicsApp.loadTextures(GraphicsApp.java:95)
    ... 14 more

I'm using:

  • x84 Windows 7

  • Eclipse Helios

  • JavaSE-1.6

  • JDK 1.6

What am I doing wrong here?

A: 

The exception was caused by being unable to find a file referenced in the code - it has nothing to do with VecMath.

The app runs fine, despite the access restrictions. I don't know if it'll come back to bite me later or what.

Rosarch