How to check Java version?

Discussion in 'Java' started by Mickey Segal, Mar 12, 2008.

  1. Mickey Segal

    Mickey Segal Guest

    Mickey Segal, Mar 12, 2008
    #1
    1. Advertising

  2. On Mar 12, 11:43 pm, "Mickey Segal" <> 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 filed a
    > 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.
    Andrew Thompson, Mar 12, 2008
    #2
    1. Advertising

  3. Mickey Segal

    Mickey Segal Guest

    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" <> wrote in message
    news:...
    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.
    Mickey Segal, Mar 12, 2008
    #3
  4. Mickey Segal

    Roedy Green Guest

    On Wed, 12 Mar 2008 08:43:53 -0400, "Mickey Segal"
    <> 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.do?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
    Roedy Green, Mar 13, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lloyd Sheen

    Express Version Kills Current Version

    Lloyd Sheen, Jun 29, 2004, in forum: ASP .Net
    Replies:
    11
    Views:
    560
    Ken Cox [Microsoft MVP]
    Jul 2, 2004
  2. Ryan Stewart
    Replies:
    11
    Views:
    978
    Ryan Stewart
    Jan 26, 2004
  3. V Green
    Replies:
    0
    Views:
    844
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    956
    PA Bear [MS MVP]
    Feb 5, 2008
  5. MowGreen [MVP]
    Replies:
    5
    Views:
    2,017
    PA Bear [MS MVP]
    Feb 9, 2008
Loading...

Share This Page