Skip to content

Instantly share code, notes, and snippets.

@smamran
Created September 20, 2015 09:03
Show Gist options
  • Save smamran/0bd8e0d39a1ea2ee527b to your computer and use it in GitHub Desktop.
Save smamran/0bd8e0d39a1ea2ee527b to your computer and use it in GitHub Desktop.
Operating System and Architecture detection i java code.
package com.netcse.java;
public class Main {
private static final String OS_NAME = System.getProperty("os.name").toString();
public static void main(String[] args) {
System.out.println("Hello world java programming in this world is nothing but java");
System.out.println(OS_NAME);
System.out.println(System.getProperty("os.arch").toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment