is Windows via System.getProperty - Java java.util

Java examples for java.util:Properties File

Description

is Windows via System.getProperty

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        System.out.println(isWindows());
    }//from  ww w . j a  v  a2 s .c  o m

    public static boolean isWindows() {
        return System.getProperty("os.name").toLowerCase().indexOf("win") >= 0;
    }
}

Related Tutorials