Get system properties using System class - Java Native OS

Java examples for Native OS:Environment

Description

Get system properties using System class

Demo Code

 
import java.util.Properties;
 
public class Main {
        public static void main(String[] args) {
                 Properties prop = System.getProperties();
                 //from  w  w  w.  j a v  a2  s .  c  o  m
                 System.out.println("Printing all System properties");
                 
                 prop.list(System.out);
        }
}

Result


Related Tutorials