- How to check your operating system by programming?
- How to check your operating system by Java programming?
- Write Java program to check operating system & its version
Hey guys, if you want to know which operating system you are using & its version, there are 2 ways to do it as follows;
- Using Command Prompt
- Using Programming
1. Using Command Prompt
- Go to Start Menu
- Go to Run
- Type cmd & press Enter/return. Command Prompt will open.
- Type ver & press Enter/return, you will get the Name of your OS & its Version that you are using
2. Using Programming
* Language : Java
* File : MyOS.java
* Date : Tuesday, October 5, 2010
* @author Atul Palandurkar
* Email : email@example.com
* Website : www.shardainfotech.com
* Blog : http://atulpalandurkar.wordpress.com
public class MyOS
public static void main(String arg)
//To find the name of operating system.
String myOS = System.getProperty("os.name");
System.out.println("Operating System : " + myOS);
//To find the version of operating system.
String myOSVersion = System.getProperty("os.version");
System.out.println("Version : " + myOSVersion);