print System Properties - Java java.lang

Java examples for java.lang:System

Description

print System Properties

Demo Code


//package com.java2s;

import java.util.Properties;

public class Main {
    public static void main(String[] argv) throws Exception {
        printSystemProperties();/*from  w  w  w  .jav  a2s.com*/
    }

    public static void printSystemProperties() {
        Properties properties = System.getProperties();
        for (Object key : properties.keySet()) {
            System.out.println(key.toString() + ":\n\t'"
                    + properties.get(key) + "'");
        }
    }
}

Related Tutorials