看看这些链接......
我们的代码库中的JRubyApplet:https://github.com/jruby/jruby/blob/master/src/org/jruby/JRubyApplet.java
用于构建签名小程序的Rake任务:https://github.com/jruby/jruby/blob/master/rakelib/applet.rake
jruby.org/tryjruby页面的来源:https://github.com/jruby/jruby.github.com/blob/master/www/tryjruby.html
对于您的情况,您可能拥有Java中的applet,引导一个org.jruby.embed.ScriptingContainer实例,然后将其提供给Applet实例,以便它可以在Ruby脚本中添加您的UI元素.applet jar中的任何东西都可以直接加载,例如require'my_applet.rb'将在jar中查找/my_applet.rb.
请享用!