Check If Java Is Installed On Your Computer | Java Programs

Output:

Java Version        : 1.8.0_77
Java Runtime Version : 1.8.0_77-b03
Java Home          : C:\Program Files\Java\jdk1.8.0_77\jre
Java Vendor         : Oracle Corporation
Java Vendor URL     : http://java.oracle.com/
Java Class Path     : C:\Users\M . Sajid\Documents\NetBe

Click Here For Java Online Compiler

Solution:

public class JavaIsInstalledOrNot {

    public static void main(String[] args) {
        System.out.println("Java Version         : " + System.getProperty("java.version"));
        System.out.println("Java Runtime Version : " + System.getProperty("java.runtime.version"));
        System.out.println("Java Home            : " + System.getProperty("java.home"));
        System.out.println("Java Vendor          : " + System.getProperty("java.vendor"));
        System.out.println("Java Vendor URL      : " + System.getProperty("java.vendor.url"));
        System.out.println("Java Class Path      : " + System.getProperty("java.class.path") + "\n");
    }
}
Share This :

Related Post

avatar

nice article in your blog.thank you for sharing useful info.
visit
web programming tutorial
welookups

delete 29 August 2018 at 20:20



sentiment_satisfied Emoticon