我尝试执行遥测查看器的 .jar 文件,然后收到以下错误消息:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: com.jogamp.opengl.GLException: Profile GL2 is not available on null, but: [GLProfile[GLES1/GLES1.hw], GLProfile[GLES2/GLES3.hw], GLProfile[GL2ES1/GLES1.hw], GLProfile[GL4ES3/GL4.hw], GLProfile[GL2ES2/GL4.hw], GLProfile[GL4/GL4.hw], GLProfile[GLES3/GLES3.hw], GLProfile[GL4/GL4.hw], GLProfile[GL3/GL4.hw], GLProfile[GL2GL3/GL4.hw]]
at com.jogamp.opengl.GLProfile.get(GLProfile.java:991)
at com.jogamp.opengl.GLProfile.get(GLProfile.java:1004)
at OpenGLChartsRegion.<init>(OpenGLChartsRegion.java:108)
at Main.main(Main.java:31)
... 5 more
您可以在此链接上查看 Telemetry 查看器的项目https://github.com/farrellf/TelemetryViewer
http://www.farrellf.com/projects/software/2019-09-08_Telemetry_Viewer_v0.6/
请帮忙。谢谢你。
最佳答案
看起来应用程序正在对 OpenGL 配置文件 GL2 进行硬编码,您运行的平台似乎不支持该配置文件,尽管异常消息似乎表明它可能支持其他配置文件(ES/嵌入式和更高版本的 GL/desktop,例如 GL4)。
看起来这是将代码硬编码到 GL2 的代码行,我想知道如果您升级到 GL4 或其他受支持的配置文件之一会发生什么?
https://github.com/farrellf/TelemetryViewer/blob/master/Telemetry%20Viewer/src/OpenGLChartsRegion.java#L108
这是 OpenGL 配置文件之间差异的摘要,取自 JOGL 库:
http://michael-bien.com/mbien/entry/jogl_2_opengl_profiles_explained/
关于java - 在 Ubuntu 20.04 中运行 Telemetry Viewer 0.6 的 .jar 文件时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62767277/