I have problems using jruby (1.1.3) on ubuntu 8.04, libgcj 4.2.3:
axel@alecrim:~$ jruby -v
Exception in thread “main” java.lang.NoClassDefFoundError:
org.jruby.Main
at gnu.java.lang.MainThread.run(libgcj.so.81)
Caused by: java.lang.ClassNotFoundException: org.jruby.Main not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/local/jruby-1.1.3/lib/bsf.jar,file:/usr/local/jruby-1.1.3/lib/profile.jar,file:./],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.81)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.81)
at java.lang.ClassLoader.loadClass(libgcj.so.81)
at java.lang.ClassLoader.loadClass(libgcj.so.81)
at gnu.java.lang.MainThread.run(libgcj.so.81)
gij --version
java version “1.5.0”
gij (GNU libgcj) version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)
I found a similar bug report about earlier versions of jruby/ubuntu/gij
versions here,
where it is filed as a resolved bug … however, I can’t resolve it on
my system:
at java.lang.ClassLoader.loadClass(libgcj.so.81)
at java.lang.ClassLoader.loadClass(libgcj.so.81)
at gnu.java.lang.MainThread.run(libgcj.so.81)
As far as I know, JRuby 1.1.3 neither compiles nor runs on GCJ, mostly
because it’s missing several tools and libraries we need. We’re
certainly open to someone getting it running, but with all the Linux
distros now providing installable OpenJDK-based JVMs, there’s hasn’t
been much interest in getting GCJ to work.
Datum: Tue, 12 Aug 2008 01:26:44 +0900
Von: Charles Oliver N. [email protected]
An: [email protected]
Betreff: Re: jruby and ubuntu and libgcj
gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/local/jruby-1.1.3/lib/bsf.jar,file:/usr/local/jruby-1.1.3/lib/profile.jar,file:./],
distros now providing installable OpenJDK-based JVMs, there’s hasn’t
been much interest in getting GCJ to work.
Charlie
Dear Charles,
thank you for responding. Could you advise which java virtual machine
should
be used for stress-free Jruby usage ?
thank you for responding. Could you advise which java virtual machine should
be used for stress-free Jruby usage ?
(On Linux) I have either used Sun’s Java 6 JDK or (more recently
moving toward) OpenJDK. I think on my Ubuntu box at home, I still
have Sun’s release installed; but, Ubuntu 8.10 should have OpenJDK
baked in:
thank you for responding. Could you advise which java virtual machine
should
be used for stress-free Jruby usage ?
(On Linux) I have either used Sun’s Java 6 JDK or (more recently
moving toward) OpenJDK. I think on my Ubuntu box at home, I still
have Sun’s release installed; but, Ubuntu 8.10 should have OpenJDK
baked in:
My understanding is, it might at least reduce start time. But that’s probably
not a reason to put a huge amount of effort into it.
GCJ is generally a lot slower at everything but startup time, because it
lacks the ability to do the runtime optimizations that are typically
responsible for Java’s best performance. My understanding is that it
does compile to something mostly native with a very large runtime
library (large as in comparable to what a JVM would be, or perhaps a bit
smaller), and that native-compiled code starts up rather fast. But most
numbers indicate that when the app is up and going, performance is not
as good as, for example, OpenJDK.
Like I say, though, we’d welcome someone helping to get JRuby running on
GCJ. It did at one point, but as we started to incorporate more Java 5+
features it started to slip away. And with OpenJDK basically making
Sun’s HotSpot JVM free AND Free, there’s been almost no demand for GCJ
over the past several months. Hell, even Debian has approved OpenJDK for
inclusion, and they were dead-set on requiring that all Free Java-based
apps be GCJ-compatible for the longest time (keeping JRuby out of the
dist for the past year or so).
Charlie
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.