Jruby and ubuntu and libgcj

Dear all,

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:

http://jira.codehaus.org/browse/JRUBY-2254

Thank you for your help.

Best regards,

Axel

Axel E. wrote:

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.

  • Charlie

-------- Original-Nachricht --------

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 :slight_smile: ?

Thank you,

Best regards,

Axel

On Mon, Aug 11, 2008 at 1:39 PM, Axel E. [email protected] wrote:

thank you for responding. Could you advise which java virtual machine should
be used for stress-free Jruby usage :slight_smile: ?

(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:

https://lists.ubuntu.com/archives/ubuntu-devel-announce/2008-July/000460.html

-------- Original-Nachricht --------

Datum: Tue, 12 Aug 2008 04:16:58 +0900
Von: [email protected]
An: [email protected]
Betreff: Re: jruby and ubuntu and libgcj

thank you for responding. Could you advise which java virtual machine
should
be used for stress-free Jruby usage :slight_smile: ?

(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:

Java related changes in intrepid

… and it now works like a charm. Thank you very much !

Best regards,

Axel

On Monday 11 August 2008 11:26:44 Charles Oliver N. wrote:

with all the Linux
distros now providing installable OpenJDK-based JVMs, there’s hasn’t
been much interest in getting GCJ to work.

Would there be any performance increase?

That is: Does GCJ actually compile to binary? Or is it more like a
wrapper for
some sort of VM?

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.

David M. wrote:

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