Discussion:
[jruby-dev] Running JRuby with Icedtea- "ArgumentError: cannot import class `java.lang.reflect.Modifier' as `Modifier'"
(too old to reply)
Kumar Sukhani
2013-07-31 22:08:11 UTC
Permalink
When I try to run JRuby with Icedtea (which provides ZeroVM, JamVM and
Cacao JVM options), it gives following error-

***@beaglebone:~# jruby -v

jruby 1.7.4.dev (1.9.3p392) 2013-04-26 c253096 on OpenJDK Zero VM
1.6.0_24-b24 [linux-arm]
ArgumentError: cannot import class `java.lang.reflect.Modifier' as
`Modifier'
java_import at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/core_ext/object.rb:63
map at org/jruby/RubyArray.java:2407
java_import at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/core_ext/object.rb:22
ModifierShortcuts at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:73
(root) at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:72
require at org/jruby/RubyKernel.java:1028
(root) at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext.rb:1
require at org/jruby/RubyKernel.java:1028
(root) at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext.rb:3
Can anyone help me to figure out this error?
--
Kumar Sukhani
+919579650250
Kumar Sukhani
2013-08-19 07:31:11 UTC
Permalink
This is working fine
puts (/a/ =~ 'haystack')
But
this(and similar) expression are not working
puts ('Kfffddfd' =~ /^[A-Z].*/)
with Icedtea.


Is there any easy way to trace which Ruby Method is mapped with
corresponding Java function ?
Like for '=~' operator which Java function is called?
When I try to run JRuby with Icedtea (which provides ZeroVM, JamVM and
Cacao JVM options), it gives following error-
jruby 1.7.4.dev (1.9.3p392) 2013-04-26 c253096 on OpenJDK Zero VM
1.6.0_24-b24 [linux-arm]
ArgumentError: cannot import class `java.lang.reflect.Modifier' as
`Modifier'
java_import at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/core_ext/object.rb:63
map at org/jruby/RubyArray.java:2407
java_import at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/core_ext/object.rb:22
ModifierShortcuts at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:73
(root) at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:72
require at org/jruby/RubyKernel.java:1028
(root) at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext.rb:1
require at org/jruby/RubyKernel.java:1028
(root) at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext.rb:3
Can anyone help me to figure out this error?
--
Kumar Sukhani
+919579650250
--
Kumar Sukhani
+919579650250
Kumar Sukhani
2013-08-19 07:34:03 UTC
Permalink
I am now testing this all on BeagleBone Black, and I cross compiled Icedtea
using this[1] reference.

[1] http://icedtea.classpath.org/wiki/CrossCompileOEClassicTutorial
Post by Kumar Sukhani
This is working fine
puts (/a/ =~ 'haystack')
But
this(and similar) expression are not working
puts ('Kfffddfd' =~ /^[A-Z].*/)
with Icedtea.
Is there any easy way to trace which Ruby Method is mapped with
corresponding Java function ?
Like for '=~' operator which Java function is called?
When I try to run JRuby with Icedtea (which provides ZeroVM, JamVM and
Cacao JVM options), it gives following error-
jruby 1.7.4.dev (1.9.3p392) 2013-04-26 c253096 on OpenJDK Zero VM
1.6.0_24-b24 [linux-arm]
ArgumentError: cannot import class `java.lang.reflect.Modifier' as
`Modifier'
java_import at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/core_ext/object.rb:63
map at org/jruby/RubyArray.java:2407
java_import at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/core_ext/object.rb:22
ModifierShortcuts at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:73
(root) at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:72
require at org/jruby/RubyKernel.java:1028
(root) at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext.rb:1
require at org/jruby/RubyKernel.java:1028
(root) at
file:/home/root/Desktop/jruby/lib/jruby.jar!/jruby/java/java_ext.rb:3
Can anyone help me to figure out this error?
--
Kumar Sukhani
+919579650250
--
Kumar Sukhani
+919579650250
--
Kumar Sukhani
+919579650250
Loading...