HOWTO: Programatically Tell What Version of the VM is Installed

Last reviewed: January 29, 1998
Article ID: Q177176
The information in this article applies to:
  • Microsoft Win32 Virtual Machine for Java

SUMMARY

This article illustrates how to programatically determine what version of the Microsoft Virtual Machine for Java is installed on the system.

MORE INFORMATION

To programatically retrieve the version information for the Microsoft Virtual Machine, you can use the SystemVersionManager.getVMVersion() static method in com.ms.util package. This method returns a Properties object that contains the Virtual Machine version data.

The code-snippet below illustrates how to get the version information of the Microsoft Virtual Machine for java from your Java applet or application:

Create a Java Project and include the following class to it:

   class test
   {
      public static void main(String[] args)
      {
       String build;
       build=com.ms.util.SystemVersionManager.getVMVersion().getProperty
            ("BuildIncrement");
       System.out.println("Using build "+build);
      }
   }

The BuildIncrement property indicates the version the Microsoft Virtual Machine for Java.

REFERENCES

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/visualj/
   http://support.microsoft.com/support/java/


Additional query words: vm version programmatically java

Keywords : kbcode JVM
Technology : kbInetDev
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 29, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.