I’m not sure if this issue is definitely related to what I stated in the
subject line. My specific problem is the following line of code doesn’t
work:
filter = javax.swing.filechooser.FileNameExtensionFilter.new(“Image
Files”,
“jpg”, “gif”)
This code gives the error:
Exception in thread “AWT-EventQueue-0” D:\rReport\lib\rb\jGUI.rb:67:in
`method_missing’: cannot load Java class
javax.swing.filefilter.FileNameExtensionFilter (NameError)
from D:\rReport\lib\rb\jGUI.rb:67:in `initialize'
from C:/Program
Files/jruby-1.1.3/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/proc.rb:6:in
call' from C:/Program Files/jruby-1.1.3/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/proc.rb:6:in
method_missing’
from C:/Program
Files/jruby-1.1.3/lib/ruby/site_ruby/1.8/builtin/javasupport/proxy/interface.rb:174:in
`__jcreate_proxy!’
from :1
…internal jruby stack elided…
I think that it may be related to the fact that
FileNameExtensionFilter’s
constructor can take 2 or more strings, but I’m not entirely sure. Any
ideas
as to how I can get this code to work? Thanks!
View this message in context:
http://www.nabble.com/Issue-with-Java-constructor-having-variable-length-arguments-tp18737820p18737820.html
Sent from the JRuby - User mailing list archive at Nabble.com.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email