我需要Vecmath,所以我去了Oracle获取最新版本的Java 3D。我没有看到下载JAR的地方,但它有一个安装程序。我下载并运行它。我假设安装程序将JAR添加为JDK扩展
我重新启动了Eclipse,它看到VecMath存在。但是,它仍然抱怨:
访问限制:Vector3f类型 因限制而无法访问 在必需的库C:\ Program上 文件\爪哇\ JRE6 \ lib中\分机\ vecmath.jar
无赖。我能够将它从编译器错误更改为警告,但是一旦我尝试运行它就会崩溃。虽然,我正在将它与OpenGL结合使用,但崩溃可能与vecmath无关。我不确定。这是一个例外:
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
我正在使用:
x84 Windows 7
Eclipse Helios
的JavaSE-1.6
JDK 1.6
我在这里做错了什么?
答案 0 :(得分:0)
该异常是由于无法找到代码中引用的文件引起的 - 它与VecMath无关。
尽管存在访问限制,该应用程序运行良好。我不知道以后会不会再咬我或是什么。