Peculiar errors with failed java_import in different scenarios
--------------------------------------------------------------
Key: JRUBY-5351
URL: http://jira.codehaus.org/browse/JRUBY-5351
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.6RC1
Reporter: Charles Oliver Nutter
Assignee: Thomas E Enebo
Fix For: JRuby 1.6
Strangely different errors.
Works as expected (NameError because YumYum is not in quotes):
{noformat}
~ ➔ jruby -rjava -e 'import "java.util.ArrayList" do; YumYum; end'
org/jruby/RubyModule.java:2530:in `const_missing': uninitialized constant
YumYum (NameError)
from -e:1:in `__file__'
from
/Users/headius/projects/jruby/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/object.rb:79:in
`java_import'
from -e:1:in `(root)'
{noformat}
Now with Minecraft's jar, also ok:
{noformat}
~ ➔ jruby -rjava -r'~/Library/Application
Support/minecraft/bin/minecraft.jar' -e 'import "er" do; YumYum; end'
org/jruby/RubyModule.java:2530:in `const_missing': uninitialized constant
YumYum (NameError)
from -e:1:in `__file__'
from
/Users/headius/projects/jruby/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/object.rb:79:in
`java_import'
from -e:1:in `(root)'
{noformat}
Require 'yaml' first:
{noformat}
~ ➔ jruby -ryaml -rjava -r'~/Library/Application
Support/minecraft/bin/minecraft.jar' -e 'import "er" do; YumYum; end'
org/jruby/javasupport/JavaClass.java:1052:in `for_name': security exception
loading Java class er (NameError)
from org/jruby/javasupport/JavaUtilities.java:34:in `get_proxy_class'
from
/Users/headius/projects/jruby/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/object.rb:46:in
`java_import'
from -e:1:in `(root)'
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email