Android examples for Android OS:OS Version
get Java Vendor
/**//from ww w. j a v a2s. co m ******************************************************************************* * Copyright (C) 2001-2015, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************************* */ import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Locale; public class Main{ public static JavaVendor getJavaVendor() { JavaVendor vendor = JavaVendor.Unknown; String javaVendorProp = System.getProperty("java.vendor", "") .toLowerCase(Locale.US).trim(); if (javaVendorProp.startsWith("ibm")) { vendor = JavaVendor.IBM; } else if (javaVendorProp.startsWith("sun") || javaVendorProp.startsWith("oracle")) { vendor = JavaVendor.Oracle; } else if (javaVendorProp.contains("android")) { vendor = JavaVendor.Android; } return vendor; } }