Can't Run Simulator

醉酒当歌 提交于 2019-12-01 06:20:08

问题


I haven't been coding for a little while, and so I fired up Eclipse, updated the plugin and Eclipse, and now when I try to launch the simulator I get an exception:

Exception in thread "AWT-EventQueue-0" java.lang.VerifyError: Bad type on operand stack

Exception Details:
Location: javax/swing/JScrollBar.getAccessibleContext()Ljavax/accessibility/AccessibleContext; @16: putfield
Reason:    
    Type 'javax/swing/JScrollBar$AccessibleJScrollBar' (current frame, stack[1]) is not assignable to 'javax/accessibility/AccessibleContext'
Current Frame:
    bci: @16
    flags: { }
    locals: { 'javax/swing/JScrollBar' }
    stack: { 'javax/swing/JScrollBar', 'javax/swing/JScrollBar$AccessibleJScrollBar' }
Bytecode:
    0x0000000: 2ab4 001f c700 0f2a bb00 6259 2ab7 0063
    0x0000010: b500 1f2a b400 1fb0                    
Stackmap Table:
    same_frame(@19)

at com.codename1.impl.javase.JavaSEPort.<init>(JavaSEPort.java:411)
at com.codename1.impl.ImplementationFactory.createImplementation(ImplementationFactory.java:69)
at com.codename1.ui.Display.init(Display.java:475)
at com.codename1.impl.javase.Executor$1.run(Executor.java:112)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
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:76)
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)

Do I need to uninstall Eclipse and re-install it? Anyone else has this problem? I tried a few apps that all used to work, and they all do this.


回答1:


Update: I have a workaround which I don't fully understand. Right click the Simulator*.launch file and select Run As -> Run Configurations. There select the simulator entry and select classpath:

In the bootstrap entries remove the JRE System Library and press run. Once you do that running and debugging should work as before.

Below is my (still applicable at this time) answer.

I was able to reproduce this and it happens on a Mac too. This looks like an Eclipse bug and I've filed an issue here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=526441 Feel free to upvote/comment on the issue so we might get a faster resolution on this.

I'm trying to find a workaround but I'm not really sure where to begin right now as this is pretty deep in the JVM/IDE. I added eclipse tags to the question hoping someone from the eclipse community has a better idea.



来源:https://stackoverflow.com/questions/46822921/cant-run-simulator

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