我需要Vecmath,所以我去了Oracle以获取最新版本的Java 3D。我没有找到下载JAR的地方,但是有一个安装程序。我下载并运行了它。我假设安装程序将JAR添加为JDK扩展
我重新启动了Eclipse,它发现VecMath存在。但是,它仍然抱怨:
访问限制:类型Vector3f
由于限制而无法访问
在所需的库C:\ Program上
文件\ Java \ jre6 \ lib \ ext \ vecmath.jar
mm我可以将其从编译器错误更改为警告,但是一旦我尝试运行它,它就会崩溃。虽然,我将其与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
日蚀赫利俄斯
JavaSE-1.6
JDK 1.6
我在这里做错了什么?
最佳答案
该异常是由于无法找到代码中引用的文件而引起的-与VecMath无关。
尽管有访问限制,该应用程序仍可以正常运行。我不知道以后是否还会再咬我。