#!/usr/bin/env ruby $LOAD_PATH << File.join(File.expand_path(File.dirname(__FILE__)),'..','yajb') require 'yajb/jbridge' include JavaBridge if !defined?(JBRIDGE_OPTIONS) then JBRIDGE_OPTIONS = {} end # NOTE:- this path is to the Mac OS X location for swingset... it'll be somewhere else on windows # NOTE2:- the classpath separator is the unix one; ':', you'll want ';' for windows JBRIDGE_OPTIONS[:classpath] = '$CLASSPATH:'+ '/Developer/Examples/Java/JFC/SwingSet2/SwingSet2.jar' at_exit { JavaBridge.break_bridge } jimport 'SwingSet2' jimport 'java.awt.GraphicsEnvironment' swingset = :SwingSet2.jnew(nil, :GraphicsEnvironment.jclass.getLocalGraphicsEnvironment(). getDefaultScreenDevice(). getDefaultConfiguration()) # Need to do *something* to keep the main thread alive loop {}