JRuby script with Rubeus and Swing exiting once packaged into jar using warble

醉酒当歌 提交于 2019-12-01 11:05:49

Warbler calls System.exit() after your main script exits. This causes the Swing EventThread to exit, closing your app.

https://github.com/jruby/warbler/blob/master/ext/JarMain.java#L131

I worked around this problem by joining with the event thread at the bottom of my start script like so:

event_thread = nil
SwingUtilities.invokeAndWait { event_thread = java.lang.Thread.currentThread }
event_thread.join

Hacky, but it works.

Just set the appropriate flag:

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