Eclipse shows empty error message with Java 9

拈花ヽ惹草 提交于 2019-11-27 19:31:04

问题


I have installed the Java 9 plugin. My project hasn't changed, but when I try to run, I get this:

If you need anything else, feel free to comment that you don't have enough info.

My .log file: https://pastebin.com/SQXZVcQk


回答1:


Seems like a configuration issue as per my understanding. There are two possible causes/solution to it:

  1. From the logs:

    Root exception:
    java.lang.ExceptionInInitializerError
        at com.jniwrapper.util.ProcessorInfo.b(SourceFile:95)
    Caused by: com.jniwrapper.LibraryNotFoundException: Cannot find JNIWrapper native library (jniwrap64.dll) in java.library.path:
    

    Eclipse is not able to configure the java.library.path properly, in which case you can try setting the VM argument using the following on the command line:

    -Djava.library.path="${workspace_loc:project}\lib;${env_var:PATH}"
    

    Check out How to add native library to "java.library.path" with Eclipse launch (instead of overriding it) for further details and platform specific solutions.

    && make sure you include the path to jdk-9 early access build that should ideally be a must for the plugin used based out of Java9.

  2. Also, the log reads

    !ENTRY org.eclipse.ui 4 0 2017-08-27 09:22:31.358
    !MESSAGE Unhandled event loop exception
    !STACK 0
    java.lang.ArrayIndexOutOfBoundsException: -1
        at es.org.chemi.games.snake.ui.GameField.createGameField(GameField.java:217)
        at es.org.chemi.games.snake.ui.GameField$1.controlResized(GameField.java:99)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:236)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    

    For the pertaining code, you might want to look into the implementation of createGameField at GameField.java:217. If this wasn't specifically occurring on previous java version for you then solving (1) should get rid of this or else you might want to give the solutions at Eclipse Bug: Unhandled event loop exception No more handles a try.




回答2:


On receiving the same error in eclipse I fixed it by selecting this option instead of the default (highlighted by the red arrow in the snapshot)



来源:https://stackoverflow.com/questions/45907867/eclipse-shows-empty-error-message-with-java-9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!