[jruby] Finding out Java version

christian m.kristian at web.de
Wed Jul 5 20:06:13 JST 2017


ENV_JAVA['java.version']

On Wed, Jul 5, 2017 at 1:05 PM, <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] *Im Auftrag von *Christian
> MICHON
> *Gesendet:* Mittwoch, 5. Juli 2017 12:58
> *An:* JRuby project mailing list <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>
> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ruby-lang.org/pipermail/jruby/attachments/20170705/1069a318/attachment.html>


More information about the JRuby mailing list