Find out windows version installed in your system using java program and cmd

You are here : Home / Core Java Tutorials /

In this tutorial we will - find out windows version installed in your system.



How to find out windows version installed in your system/windows >
  1. You may use this java program to find windows version installed in your system >
I have installed AMD64 >which  is also known as  x64 and x86-64, so AMD64 is the 64-bit version of the windows.
/** Find current Operating System version (OS)  (32 bit version or 64 bit version window ?) */
public class FindCurrentOperatingSystemVesrionExample {
   public static void main(String[] args) {
          String currentOperatingSystemVersion = System.getProperty("os.arch");
          System.out.println("current (OS) Operating System Version = "+
                    currentOperatingSystemVersion);  //AMD64 is 64-bit version of windows
   }
}

/*OUTPUT
current (OS) Operating System Version = amd64
*/
Output of program may vary on different systems.

  1. You may use this CMD command to find windows version installed in your system >
Go to CMD and type wmic os get osarchitecture

  1. Or You may use Go to My Computer, right click, Properties to find windows version installed in your system >


Summary -
So in this tutorial we learned how to find out windows version installed in your system using java program and CMD (command line).



Having any doubt? or you you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.



RELATED LINKS>

Collection - List, Set and Map all properties in tabular form


No comments:

Post a Comment