IntelliJ 2016.2.5/MAC OS Sierra 10.12.1でJOGL2を使用するJavaプログラムを実行しようとしています。私は(システムによって異なります)すべてのgluegen
とjogl
バリエーションのように見つけることができるJOGL2 \ジャーフォルダを追加しましたIntelliJ 2016.2.5/MAC OS Sierra 10.12.1でJOGL2を実行するとエラーが発生する
jar
lib
:
は、私は次のサブフォルダを含むフォルダのJOGL2を持っていますIntelliJのライブラリであり、IDEは実行前にエラーを強調しません。
jarフォルダの一部として追加されたファイルの一部が表示されます。
ターミナルでは実行できるので、コードは正常に動作していますが、IntelliJでは動作しません。私はプログラムを実行しようとすると、次のエラーが表示されます。
編集:それはpackage
の記述と関係があると判明します。パッケージ名を削除して端末経由で実行すると、うまく動作します。
Error loading texture image.jpg
Error loading texture image2.jpg
Exception in thread "main-FPSAWTAnimator#00-Timer0" com.jogamp.opengl.util.AnimatorBase$UncaughtAnimatorException: java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:92)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:201)
at com.jogamp.opengl.Threading.invokeOnOpenGLThread(Threading.java:202)
at com.jogamp.opengl.Threading.invoke(Threading.java:221)
at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
... 4 more
Caused by: com.jogamp.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NullPointerException
at mypackage.Show.computeImmediateMode(Show.java:96)
at mypackage.Show.computeDisplayList(Show.java:133)
at mypackage.GraphicScene.createRenderObjects(GraphicScene.java:70)
at mypackage.GraphicScene.<init>(GraphicScene.java:57)
at mypackage.Graphic.init(Graphic.java:217)
at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:644)
at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:667)
at com.jogamp.opengl.awt.GLCanvas$10.run(GLCanvas.java:1407)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1291)
... 16 more
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
at com.jogamp.opengl.Threading.invoke(Threading.java:223)
at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
at sun.lwawt.LWRepaintArea.paintComponent(LWRepaintArea.java:59)
at sun.awt.RepaintArea.paint(RepaintArea.java:240)
at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
at java.awt.Component.dispatchEventImpl(Component.java:4965)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NullPointerException
at mypackage.Tex3.reshape(Tex3.java:236)
at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:751)
at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1420)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
... 30 more
2016-11-08 02:30:35.962 java[15337:804493] IMKInputSession presentFunctionRowItemTextInputViewWithEndpoint:completionHandler: : *NO* NSRemoteViewController to client, NSError=Error Domain=NSCocoaErrorDomain Code=4099 "The connection from pid 0 was invalidated from this process." UserInfo={NSDebugDescription=The connection from pid 0 was invalidated from this process.}, com.apple.inputmethod.EmojiFunctionRowItem
これを修正する方法はありますか。
ありがとうございます!
それは何の関係もありません
String
"/img/image1.jpg" として直接渡され、したがって、私はからコードを変更しましたJOGLと関係があります。テクスチャで使用されるイメージを含むファイルまたはストリームの代わりにヌルを取得するため、おそらくNullPointerExceptionが発生します。「mypackage.Tex3.reshape(Tex3.java:236)」を参照してください。 – gouessej