Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #4392 > unrolled thread

Jruby -v failing with possible Java version issue

Started byRuby Student <ruby.student@gmail.com>
First post2011-05-12 12:16 -0500
Last post2011-05-15 10:10 -0500
Articles 11 — 5 participants

Back to article view | Back to comp.lang.ruby


Contents

  Jruby -v failing with possible Java version issue Ruby Student <ruby.student@gmail.com> - 2011-05-12 12:16 -0500
    Re: Jruby -v failing with possible Java version issue Matt Lawrence <matt@technoronin.com> - 2011-05-12 12:20 -0500
    Re: Jruby -v failing with possible Java version issue "Matthew K. Williams" <matt@harpstar.com> - 2011-05-12 12:26 -0500
      Re: Jruby -v failing with possible Java version issue Ruby Student <ruby.student@gmail.com> - 2011-05-12 13:17 -0500
        Re: Jruby -v failing with possible Java version issue "Matthew K. Williams" <matt@harpstar.com> - 2011-05-12 13:34 -0500
          Re: Jruby -v failing with possible Java version issue Ruby Student <ruby.student@gmail.com> - 2011-05-12 14:39 -0500
            Re: Jruby -v failing with possible Java version issue Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-12 14:47 -0500
            Re: Jruby -v failing with possible Java version issue "Matthew K. Williams" <matt@harpstar.com> - 2011-05-12 15:15 -0500
              Re: Jruby -v failing with possible Java version issue Ruby Student <ruby.student@gmail.com> - 2011-05-13 12:51 -0500
                Re: Jruby -v failing with possible Java version issue Charles Oliver Nutter <headius@headius.com> - 2011-05-14 18:11 -0500
                  Re: Jruby -v failing with possible Java version issue Ruby Student <ruby.student@gmail.com> - 2011-05-15 10:10 -0500

#4392 — Jruby -v failing with possible Java version issue

FromRuby Student <ruby.student@gmail.com>
Date2011-05-12 12:16 -0500
SubjectJruby -v failing with possible Java version issue
Message-ID<BANLkTinE=E=eZWmnydrxRPuxnChN2e8ijg@mail.gmail.com>
[Note:  parts of this message were removed to make it a legal post.]

Hello team,

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.

Downloaded file:
 *jruby-bin-1.6.1.tar*

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 Corporation* <http://java.com/>
Version: *Java SE 6*
Operating System: *Linux 2.6.32-71.24.1.el6.x86_64*
Architecture: *amd64*
*
*
*
*
*root@myserver # /opt/jruby* -ls -l
-rw-r--r-- 1 root root     1799 Apr 12 12:23 README
-rw-r--r-- 1 root root     2572 Apr 12 12:23 LICENSE.RUBY
-rw-r--r-- 1 root root   113210 Apr 12 12:23 COPYING
drwxr-xr-x 2 root root     4096 Apr 12 12:26 bin
drwxr-xr-x 6 root root     4096 May 12 08:20 samples
drwxr-xr-x 4 root root     4096 May 12 08:20 lib
drwxr-xr-x 5 root root     4096 May 12 08:20 docs
drwxr-xr-x 3 root root     4096 May 12 08:20 tool
drwxr-xr-x 3 root root     4096 May 12 08:20 share
drwxr-xr-x 2 root root     4096 May 12 08:22 jruby-1.6.1

root@myserver # *echo $PATH*
/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:
*/opt/jruby/bin*
:/usr/local/bin:/usr/local/sbin:/suptools/bin:.:/opt/jruby/bin

When I try *jruby -v*, this is what I get:

 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<name>=<value>
              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

Any help will be appreciated!

Thank you


-- 
Ruby Student

[toc] | [next] | [standalone]


#4393

FromMatt Lawrence <matt@technoronin.com>
Date2011-05-12 12:20 -0500
Message-ID<alpine.LRH.2.02.1105121218520.659@oberon.technoronin.com>
In reply to#4392
On Fri, 13 May 2011, Ruby Student wrote:

> Hello team,
>
> 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.

[toc] | [prev] | [next] | [standalone]


#4395

From"Matthew K. Williams" <matt@harpstar.com>
Date2011-05-12 12:26 -0500
Message-ID<Pine.LNX.4.62.1105121349470.31025@codex.lorelied.org>
In reply to#4392
On Fri, 13 May 2011, Ruby Student wrote:

> Hello team,
>
> 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.
>
> Downloaded file:
> *jruby-bin-1.6.1.tar*
>
> 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 Corporation* <http://java.com/>
> Version: *Java SE 6*
> Operating System: *Linux 2.6.32-71.24.1.el6.x86_64*
> Architecture: *amd64*

I'm not sure if the IBM Java supports all the flags which Sun/Oracle java 
supports.


> root@myserver # *echo $PATH*
> /sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:
> */opt/jruby/bin*
> :/usr/local/bin:/usr/local/sbin:/suptools/bin:.:/opt/jruby/bin
>

Your path looks really weird here.

Also, I think that jruby requires the jdk, not the jre.

> When I try *jruby -v*, this is what I get:
>
> root@myserver  # jruby -v
> JVMJ9VM007E Command-line option unrecognised: -client
> Could not create the Java virtual machine.
>

try a

which java

and a

java -version

But I do believe there's an issue with IBM's java version.

Matt

[toc] | [prev] | [next] | [standalone]


#4401

FromRuby Student <ruby.student@gmail.com>
Date2011-05-12 13:17 -0500
Message-ID<BANLkTimK3j-P_+gyQ=6LqSfzNticPL8WnA@mail.gmail.com>
In reply to#4395
Hi,

This is the output of the commands suggested:

root@myserver # which java
/usr/bin/java

root@myserver # java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 2.2)
IBM J9SE VM (build 2.2, J2RE 1.4.2 IBM J9 2.2 Linux amd64-64
j9xa64142-20061124 (JIT enabled)
J9VM - 20061121_1035_LHdSMr
JIT  - r7_level20061020_1803)

My path:

root@myserver # echo $PATH
/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/jruby/bin:/usr/local/bin:/usr/local/sbin:/suptools/bin:.

Thank you


On Thu, May 12, 2011 at 1:26 PM, Matthew K. Williams <matt@harpstar.com>wrote:

>
> On Fri, 13 May 2011, Ruby Student wrote:
>
>  Hello team,
>>
>> 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.
>>
>> Downloaded file:
>> *jruby-bin-1.6.1.tar*
>>
>> 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 Corporation* <http://java.com/>
>>
>> Version: *Java SE 6*
>> Operating System: *Linux 2.6.32-71.24.1.el6.x86_64*
>> Architecture: *amd64*
>>
>
> I'm not sure if the IBM Java supports all the flags which Sun/Oracle java
> supports.
>
>
>
>  root@myserver # *echo $PATH*
>>
>> /sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:
>> */opt/jruby/bin*
>> :/usr/local/bin:/usr/local/sbin:/suptools/bin:.:/opt/jruby/bin
>>
>>
> Your path looks really weird here.
>
> Also, I think that jruby requires the jdk, not the jre.
>
>
>  When I try *jruby -v*, this is what I get:
>>
>> root@myserver  # jruby -v
>> JVMJ9VM007E Command-line option unrecognised: -client
>> Could not create the Java virtual machine.
>>
>>
> try a
>
> which java
>
> and a
>
> java -version
>
> But I do believe there's an issue with IBM's java version.
>
> Matt
>
>


-- 
Ruby Student

[toc] | [prev] | [next] | [standalone]


#4406

From"Matthew K. Williams" <matt@harpstar.com>
Date2011-05-12 13:34 -0500
Message-ID<Pine.LNX.4.62.1105121458350.31025@codex.lorelied.org>
In reply to#4401
On Fri, 13 May 2011, Ruby Student wrote:

> Hi,
>
> This is the output of the commands suggested:
>
> root@myserver # which java
> /usr/bin/java
>
> root@myserver # java -version
> java version "1.4.2"
> Java(TM) 2 Runtime Environment, Standard Edition (build 2.2)
> IBM J9SE VM (build 2.2, J2RE 1.4.2 IBM J9 2.2 Linux amd64-64
> j9xa64142-20061124 (JIT enabled)
> J9VM - 20061121_1035_LHdSMr
> JIT  - r7_level20061020_1803)

1.4.2 won't work.  You need java 1.6.  FWiW, Java 1.4 was sunsetted a 
number of years ago.  1.5 was sunset in 2009, I believe.

And IBM Java won't work.

Matt

[toc] | [prev] | [next] | [standalone]


#4416

FromRuby Student <ruby.student@gmail.com>
Date2011-05-12 14:39 -0500
Message-ID<BANLkTima9U8PXEK0S9df8zvLgnwxnfGQHA@mail.gmail.com>
In reply to#4406
[Note:  parts of this message were removed to make it a legal post.]

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 Corporation* <http://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.

Thank you


On Thu, May 12, 2011 at 2:34 PM, Matthew K. Williams <matt@harpstar.com>wrote:

> On Fri, 13 May 2011, Ruby Student wrote:
>
>  Hi,
>>
>> This is the output of the commands suggested:
>>
>> root@myserver # which java
>> /usr/bin/java
>>
>> root@myserver # java -version
>> java version "1.4.2"
>> Java(TM) 2 Runtime Environment, Standard Edition (build 2.2)
>> IBM J9SE VM (build 2.2, J2RE 1.4.2 IBM J9 2.2 Linux amd64-64
>> j9xa64142-20061124 (JIT enabled)
>> J9VM - 20061121_1035_LHdSMr
>> JIT  - r7_level20061020_1803)
>>
>
> 1.4.2 won't work.  You need java 1.6.  FWiW, Java 1.4 was sunsetted a
> number of years ago.  1.5 was sunset in 2009, I believe.
>
> And IBM Java won't work.
>
> Matt
>
>


-- 
Ruby Student

[toc] | [prev] | [next] | [standalone]


#4420

FromPhillip Gawlowski <cmdjackryan@googlemail.com>
Date2011-05-12 14:47 -0500
Message-ID<BANLkTikYnN9NmYqs-3SH_=NYn_Zzj6vqaQ@mail.gmail.com>
In reply to#4416
On Thu, May 12, 2011 at 9:39 PM, Ruby Student <ruby.student@gmail.com> wrote:

> 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 Gawlowski

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.

[toc] | [prev] | [next] | [standalone]


#4434

From"Matthew K. Williams" <matt@harpstar.com>
Date2011-05-12 15:15 -0500
Message-ID<Pine.LNX.4.62.1105121638420.31025@codex.lorelied.org>
In reply to#4416
On Fri, 13 May 2011, Ruby Student wrote:

> But I have 1.6, I installed it.

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.

> 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 Corporation* <http://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.

Matt

[toc] | [prev] | [next] | [standalone]


#4506

FromRuby Student <ruby.student@gmail.com>
Date2011-05-13 12:51 -0500
Message-ID<BANLkTin6yxuvi5LtDuTf-rVy1M+728_RjA@mail.gmail.com>
In reply to#4434
[Note:  parts of this message were removed to make it a legal post.]

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(TM) 64-Bit
Server VM 1.6.0_25) [linux-amd64-java]

Thank you for your help!

On Thu, May 12, 2011 at 4:15 PM, Matthew K. Williams <matt@harpstar.com>wrote:

> On Fri, 13 May 2011, Ruby Student wrote:
>
>  But I have 1.6, I installed it.
>>
>
> 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.
>
>  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 Corporation* <http://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.
>
> Matt
>
>


-- 
Ruby Student

[toc] | [prev] | [next] | [standalone]


#4552

FromCharles Oliver Nutter <headius@headius.com>
Date2011-05-14 18:11 -0500
Message-ID<BANLkTikvm2-Qvx62h4x_YmdKNRnU8Z5hag@mail.gmail.com>
In reply to#4506
On Fri, May 13, 2011 at 12:51 PM, Ruby Student <ruby.student@gmail.com> wrote:
> 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(TM) 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.

- Charlie

[toc] | [prev] | [next] | [standalone]


#4567

FromRuby Student <ruby.student@gmail.com>
Date2011-05-15 10:10 -0500
Message-ID<BANLkTimy-E_2gmq=pMr4N1p9-+6bqUyAQA@mail.gmail.com>
In reply to#4552
[Note:  parts of this message were removed to make it a legal post.]

Charlie,

Thank you for the info. I am sure it will become useful.

Thanks again,

On Sat, May 14, 2011 at 7:11 PM, Charles Oliver Nutter
<headius@headius.com>wrote:

> On Fri, May 13, 2011 at 12:51 PM, Ruby Student <ruby.student@gmail.com>
> wrote:
> > 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(TM)
> 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.
>
> - Charlie
>
>


-- 
Ruby Student

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.ruby


csiph-web