Sha256: 52fe58ccc568e4849ef9f31d4f59316a4323c9a5751cdf649d841f5730761db3

Contents?: true

Size: 482 Bytes

Versions: 1

Compression:

Stored size: 482 Bytes

Contents

require 'java'

import javax.swing.SwingUtilities

# http://stackoverflow.com/questions/10108822/jruby-script-with-rubeus-and-swing-exiting-once-packaged-into-jar-using-warble
# 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
event_thread = nil
SwingUtilities.invokeAndWait { event_thread = java.lang.Thread.currentThread }
event_thread.join

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shortcut-0.0.2 lib/keep_running.rb