[jruby] Finding out Java version

Christian MICHON christian.michon at gmail.com
Wed Jul 5 19:58:00 JST 2017


>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>
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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ruby-lang.org/pipermail/jruby/attachments/20170705/ced13809/attachment.html>


More information about the JRuby mailing list