How to check Java version? - Java

This is a discussion on How to check Java version? - Java ; The simple answer used to be to check java.version or java.vm.version, but the current JRE 1.6.0_05 reports both these values as 10.0-b19. I filed a bug on similar behavior in JRE 1.7 (soon to appear at http://bugs.sun.com/bugdatabase/view...bug_id=6674346 ) but was ...

+ Reply to Thread
Results 1 to 4 of 4

How to check Java version?

  1. Default How to check Java version?

    The simple answer used to be to check java.version or java.vm.version, but
    the current JRE 1.6.0_05 reports both these values as 10.0-b19. I filed a
    bug on similar behavior in JRE 1.7 (soon to appear at
    http://bugs.sun.com/bugdatabase/view...bug_id=6674346) but was
    surprised to find that the problem extends back to JRE 1.6 as well.

    How do the Java testers at http://www.java.com/en/download/help/testvm.xml
    and http://www.javatester.org/version.html get the right answer despite this
    bug?


  2. Default Re: How to check Java version?

    On Mar 12, 11:43 pm, "Mickey Segal" <not_monito...@example.com> wrote:
    > The simple answer used to be to check java.version or java.vm.version, but
    > the current JRE 1.6.0_05 reports both these values as 10.0-b19.  I fileda
    > bug on similar behavior in JRE 1.7 (soon to appear athttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6674346) but was
    > surprised to find that the problem extends back to JRE 1.6 as well.
    >
    > How do the Java testers athttp://www.java.com/en/download/help/testvm.xml
    > andhttp://www.javatester.org/version.htmlget the right answer despite this
    > bug?


    Huhh? The makers of the second version checker
    actually link to a page that shows the source,
    and there is nothing special about it.

    I tried their applet and recompiling the code
    from the stated source and got the same answer of
    'Java Version: 1.6.0 from Sun Microsystems Inc.'
    for both the live applet and compiled code.

    The command line says..
    1.6.0-b105 (amongst other stuff, but for some
    reason I cannot 'drage/select' text in the CLI
    window of this machine I'm using).

    For *major* version (if that is what interests
    you) I would suggest using the technique I used
    in the JavaVersionApplet. try/catches on
    instantiating classes introduced in each
    subsequent version, incrementing a counter
    to keep track.

    --
    Andrew T.

  3. Default Re: How to check Java version?

    Oops. Only java.vm.version is reporting wrong. java.version is reporting
    correctly. In the past java.vm.version was useful for getting build
    numbers.

    "Andrew Thompson" <andrewthommo@gmail.com> wrote in message
    news:43513bc9-69f9-4406-b5cc-7cc0fd7dc80f@e6g2000prf.googlegroups.com...
    I tried their applet and recompiling the code
    from the stated source and got the same answer of
    'Java Version: 1.6.0 from Sun Microsystems Inc.'
    for both the live applet and compiled code.


  4. Default Re: How to check Java version?

    On Wed, 12 Mar 2008 08:43:53 -0400, "Mickey Segal"
    <not_monitored@example.com> wrote, quoted or indirectly quoted someone
    who said :

    >The simple answer used to be to check java.version or java.vm.version, but
    >the current JRE 1.6.0_05 reports both these values as 10.0-b19. I filed a
    >bug on similar behavior in JRE 1.7 (soon to appear at
    >http://bugs.sun.com/bugdatabase/view...bug_id=6674346) but was
    >surprised to find that the problem extends back to JRE 1.6 as well.


    see http://mindprod.com/applet/wassup.html

    look over all the properties.

    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com

+ Reply to Thread