Display the current user name, current OS version, Java version, Java Home using java code.

package one;

public class Version {
public static void main(String[] a)
String s1="user.name";
String s2="os.version";
String s3="java.version";
String s4="java.home";
System.out.println("The current user is " + System.getProperty(s1));
System.out.println("Os version: " + System.getProperty(s2));
System.out.println("Java version: " + System.getProperty(s3));
System.out.println("Java Home: " + System.getProperty(s4));

1 comment :

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training

    Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes


Copyright © Rough Record. Designed by OddThemes