Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.reflect.InvocationTargetException #266

Open
zyxgis opened this issue May 31, 2023 · 3 comments
Open

java.lang.reflect.InvocationTargetException #266

zyxgis opened this issue May 31, 2023 · 3 comments

Comments

@zyxgis
Copy link

zyxgis commented May 31, 2023

error:

C:\Users\admin\Downloads\worldwind-v2.2.1>java -Xmx1024m -Dsun.java2d.noddraw=true -classpath .\worldwind.jar;.\worldwindx.jar;.\gdal.jar;.\jogl-all.jar;.\gluegen-rt.jar gov.nasa.worldwindx.examples.ApplicationTemplate


java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
        at gov.nasa.worldwindx.examples.ApplicationTemplate.start(Unknown Source)
        at gov.nasa.worldwindx.examples.ApplicationTemplate.main(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 6
        at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:171)
        at com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
        at com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1513)
        at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:609)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4839)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4839)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4839)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4839)
        at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:729)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/java.awt.Window.addNotify(Window.java:791)
        at java.desktop/java.awt.Frame.addNotify(Frame.java:495)
        at java.desktop/java.awt.Window.pack(Window.java:829)
        at gov.nasa.worldwindx.examples.ApplicationTemplate$AppFrame.initialize(Unknown Source)
        at gov.nasa.worldwindx.examples.ApplicationTemplate$AppFrame.<init>(Unknown Source)
        ... 7 more

jdk info:

C:\Users\admin>java -version
java version "17.0.4" 2022-07-19 LTS
Java(TM) SE Runtime Environment (build 17.0.4+11-LTS-179)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.4+11-LTS-179, mixed mode, sharing)

@zyxgis
Copy link
Author

zyxgis commented May 31, 2023

os : windows 10 21H2

@Eldenayri
Copy link

You have to use jdk11. It's not working with jdk17 or jdk20.

@haraldsteinlechner
Copy link

haraldsteinlechner commented May 21, 2024

To let you know, there is another workaround here: jzy3d/jzy3d-api#159 (comment) which worked for me with latest jdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants