[jruby] Finding out Java version

changepoint_advi.fischer at extaccount.com changepoint_advi.fischer at extaccount.com
Wed Jul 5 20:10:12 JST 2017


Aaaaah, thank you. This suits much better.

Ronald

Von: JRuby [mailto:jruby-bounces at ruby-lang.org] Im Auftrag von christian
Gesendet: Mittwoch, 5. Juli 2017 13:06
An: JRuby project mailing list <jruby at ruby-lang.org>
Betreff: Re: [jruby] Finding out Java version

ENV_JAVA['java.version']

On Wed, Jul 5, 2017 at 1:05 PM, <changepoint_advi.fischer at extaccount.com<mailto:changepoint_advi.fischer at extaccount.com>> wrote:
I see …. So, no chance to get it without doing a

   require ‘java’.

I had hoped that there would be a constant already available. Thanks a lot.

Von: JRuby [mailto:jruby-bounces at ruby-lang.org<mailto:jruby-bounces at ruby-lang.org>] Im Auftrag von Christian MICHON
Gesendet: Mittwoch, 5. Juli 2017 12:58
An: JRuby project mailing list <jruby at ruby-lang.org<mailto:jruby at ruby-lang.org>>
Betreff: Re: [jruby] Finding out Java version

From cmd line:
$ jruby -v
$ java -version
From ruby script:
require 'java'
Java::JavaLang::System.getProperty 'java.version'

On Wed, Jul 5, 2017 at 12:37 PM, <changepoint_advi.fischer at extaccount.com<mailto:changepoint_advi.fischer at extaccount.com>> wrote:
I know that I can find the Jruby version from within a JRuby program by

JRUBY_VERSION

Is there also a way to get the version of the Java Virtual Machine I'm running on?

Ronald

If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support.


If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support.



If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ruby-lang.org/pipermail/jruby/attachments/20170705/f3170428/attachment-0001.html>


More information about the JRuby mailing list