Hi
I have an issue requiring some libraries inside a SwingWorker. Here is a broken example:
test.rb
class LaunchThread < javax.swing.SwingWorker
def doInBackground
require 'yaml'
p 'yaml'
end
def done
get
rescue java.util.concurrent.ExecutionException => ex
raise ex.cause
end
end
LaunchThread.new.execute
f = javax.swing.JFrame.new('Test')
f.visible = true
Execution with JRuby 9 and JRuby 1.7:
$ jruby -v
jruby 9.0.0.0.rc2 (2.2.2) 2015-07-09 ff331eb OpenJDK 64-Bit Server VM 25.60-b22 on 1.8.0_60-internal-b22 +jit [linux-amd64]
$ jruby test.rb
Exception in thread "AWT-EventQueue-0" org.jruby.exceptions.RaiseException: (NameError) missing class name (`org.jruby.ext.psych.PsychLibrary')
at org.jruby.javasupport.JavaUtilities.get_proxy_or_package_under_package(org/jruby/javasupport/JavaUtilities.java:54)
at RUBY.method_missing(uri:classloader:/jruby/java/java_package_module_template.rb:14)
at RUBY.<top>(/home/bruno/.rbenv/versions/jruby-9.0.0.0.rc2/lib/ruby/stdlib/psych.rb:4)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:940)
at RUBY.(root)(/home/bruno/.rbenv/versions/jruby-9.0.0.0.rc2/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1)
at RUBY.<top>(/home/bruno/.rbenv/versions/jruby-9.0.0.0.rc2/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:940)
at RUBY.(root)(/home/bruno/.rbenv/versions/jruby-9.0.0.0.rc2/lib/ruby/stdlib/yaml.rb:5)
at test.doInBackground(test.rb:3)
[...]
$ jruby -v
jruby 1.7.13 (1.9.3p392) 2014-06-24 43f133c on OpenJDK 64-Bit Server VM 1.8.0_60-internal-b22 +indy [linux-amd64]
$ jruby test.rb
"yaml"
Thanks
Hi
I have an issue requiring some libraries inside a SwingWorker. Here is a broken example:
test.rb
Execution with JRuby 9 and JRuby 1.7:
Thanks