Java System.getProperties()

Syntax

System.getProperties() has the following syntax.

public static Properties getProperties()

Example

In the following code shows how to use System.getProperties() method.


// ww w . j  a  v  a 2 s .co  m

import java.util.Properties;

public class Main {

   public static void main(String[] args) {

      Properties p = System.getProperties();
      p.list(System.out);
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable