You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
root@raspberrypi:~# jruby hello.rb
ArgumentError: cannot import class java.lang.reflect.Modifier' asModifier'
java_import at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/core_ext/object.rb:63
map at org/jruby/RubyArray.java:2413
java_import at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/core_ext/object.rb:22
ModifierShortcuts at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:73
(root) at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:72
require at org/jruby/RubyKernel.java:1082
(root) at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/java_ext.rb:1
require at org/jruby/RubyKernel.java:1082
(root) at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/java_ext.rb:3
The text was updated successfully, but these errors were encountered:
Our embedded GSoC student ran into this too. There's something peculiar about how the strings are encoded/decoded on some builds of OpenJDK (seems like the IcedTea builds) for ARM that causes this logic to fail. It basically does a regexp match of the "Modifier" name and doesn't match inside core/src/main/ruby/jruby/java/core_ext/object.rb.
That's all I have to go on at the moment.
I believe this is a bug in the IcedTea builds, but I have not been able to sort out what exactly is wrong.
I had no issues about 2 months ago running JRuby on Raspian and my Raspberry pi other than jnr-posix not loading correctly (which did not prevent jruby from running -- e.g. different issue). I wonder if a later openjdk release fixes this?
Due to length of time with no more information and my last comment where I was able to run JRuby (with jffi unpackaging workarounds) I am closing. Please re-open if this is still an issue.
Testing out JRuby 1.7.6 on Raspberry pi. Even simple test programs fail to execute:
root@raspberrypi:~# jruby -v
jruby 1.7.6 (1.9.3p392) 2013-10-22 6004147 on OpenJDK Zero VM 1.7.0_25-b30 [linux-arm]
root@raspberrypi:~# cat hello.rb
puts "hello world"
root@raspberrypi:~# jruby hello.rb
ArgumentError: cannot import class
java.lang.reflect.Modifier' as
Modifier'java_import at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/core_ext/object.rb:63
map at org/jruby/RubyArray.java:2413
java_import at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/core_ext/object.rb:22
ModifierShortcuts at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:73
(root) at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:72
require at org/jruby/RubyKernel.java:1082
(root) at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/java_ext.rb:1
require at org/jruby/RubyKernel.java:1082
(root) at file:/usr/local/rvm/rubies/jruby-1.7.6/lib/jruby.jar!/jruby/java/java_ext.rb:3
The text was updated successfully, but these errors were encountered: