root@myserver # jruby -v
JVMJ9VM007E Command-line option unrecognised: -client
Could not create the Java virtual machine.
Usage: java [-options] class [args…]
(to execute a class)
or java [-jar] [-options] jarfile [args…]
(to execute a jar file)
where options include:
-cp -classpath <directories and zip/jar files separated by :>
set search path for application classes and resources
-D=
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
-assert print help on assert options
I installed jruby 1.6.1, as fully described below.
When I run the jruby -v command, it fails. Please see output at the end of
this post.
I dug into this a few months ago. It looks like the IBM implementation
of
Java doesn’t support the “-client” command line switch. I wound up
switching to a different version of Java.
– Matt
It’s not what I know that counts.
It’s what I can remember in time to use.
Perhaps, like you said, I have to switch from IBM to Oracle version.
I don’t want to remove the IBM version since it might be used by some
application on the server, but I am wondering if I can have multiple Java
versions from different vendors.
Yes, you can. Just make sure to install OpenJRE/OpenJDK to its own
directory, and specify this version whenever you want to use JRuby.
Then, you can test if the Oracle version makes any of your other apps
fail, before migrating over (if you want to).
You should also post JRuby specific questions one mailinglist over on
JRuby-user. There’s the experts who can help you with both Java and
JRuby issues.
–
Phillip G.
Though the folk I have met,
(Ah, how soon!) they forget
When I’ve moved on to some other place,
There may be one or two,
When I’ve played and passed through,
Who’ll remember my song or my face.
But I have 1.6, I installed it.
If I go to the Oracle site and run their applet to verify the java
version,
I get the following:
When I verify Java on the Oracle site, I get the following:
Your Java is Working
Java update available
Your Java configuration is as follows:
Vendor: IBM Corporationhttp://java.com/
Version: Java SE 6
Operating System: Linux 2.6.32-71.24.1.el6.x86_64
Architecture: amd64
Perhaps, like you said, I have to switch from IBM to Oracle version.
I don’t want to remove the IBM version since it might be used by some
application on the server, but I am wondering if I can have multiple
Java
versions from different vendors.
OK gents, I installed Java 1.6 and pointed to it via the JAVA_HOME
environmental variable. It looks like it worked.
jruby -v
jruby 1.6.1 (ruby-1.8.7-p330) (2011-04-12 85838f6) (Java HotSpot™ 64-Bit
Server VM 1.6.0_25) [linux-amd64-java]
Thank you for your help!
Just saw this thread today…
If you (or anyone else) need to use IBM JDK and get that “-client”
error, you can pass “–noclient” to JRuby to disable that flag.
Normally we pass -client to the JVM because on Hotspot/OpenJDK (by far
the most widely used) it helps startup time a lot. Unfortunately it’s
not a standard flag.
That may be the case, however, when you ran java -version, it says 1.4.2
So that’s the one which is first in your path.
Vendor: IBM Corporationhttp://java.com/
Version: Java SE 6
Operating System: Linux 2.6.32-71.24.1.el6.x86_64
Architecture: amd64
How are you verifying this??? Via a browser or an applet? That does
not
necessarily count.
Perhaps, like you said, I have to switch from IBM to Oracle version.
I don’t want to remove the IBM version since it might be used by some
application on the server, but I am wondering if I can have multiple Java
versions from different vendors.
Yes, you can. It is controlled by your path. Just make sure that the
version you want to use comes first in the path.