Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static boolean isAndroid(String vmName) {
        String lowerVMName = vmName.toLowerCase();

        return lowerVMName.contains("dalvik") //
                || lowerVMName.contains("lemur") // aliyun-vm name
        ;
    }

    public static boolean isAndroid() {
        return isAndroid(System.getProperty("java.vm.name"));
    }
}