Example usage for java.lang System getProperties

List of usage examples for java.lang System getProperties

Introduction

In this page you can find the example usage for java.lang System getProperties.

Prototype

public static Properties getProperties() 

Source Link

Document

Determines the current system properties.

Usage

From source file:MainClass.java

public static void main(String[] args) {
    java.util.Properties properties = System.getProperties();
    properties.list(System.out);
}

From source file:MainClass.java

public static void main(String[] args) {

    java.util.Properties properties = System.getProperties();
    properties.list(System.out);

}

From source file:Main.java

public static void main(String[] args) {
    Properties prop = System.getProperties();
    System.out.println("Printing all System properties");
    prop.list(System.out);/*  www .  ja v  a 2s .  co  m*/
}

From source file:Main.java

public static void main(String[] args) {

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

From source file:Main.java

public static void main(String[] args) {
    Properties properties = System.getProperties();

    String pathSeparator = properties.getProperty("path.separator");
    System.out.println("pathSeparator = " + pathSeparator);
}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    Properties props = System.getProperties();

    Enumeration e = props.propertyNames();
    for (; e.hasMoreElements();) {
        String propName = (String) e.nextElement();
        System.out.println(propName);
        String propValue = (String) props.get(propName);
        System.out.println(propValue);
    }//from  w  w w  .  jav  a2s  .  c  o m
}

From source file:MainClass.java

public static void main(String[] a) {
    Properties props = System.getProperties();
    Iterator iter = props.entrySet().iterator();

    while (iter.hasNext()) {
        Map.Entry entry = (Map.Entry) iter.next();
        System.out.println(entry.getKey() + " -- " + entry.getValue());
    }/* ww w  .  j ava2 s .com*/

}

From source file:PropView.java

public static void main(String args[]) throws Exception {
    Properties properties = System.getProperties();
    properties.list(System.out);/*  w  w w . jav a 2s .  c  o m*/

    FileInputStream in = null;

    in = new FileInputStream(args[0]);
    properties.load(in);

    System.getProperties().list(System.out);
    System.out.println("\nValue of local.animal.defined is " + Boolean.getBoolean("local.animal.defined"));
    System.out.println("\nValue of local.animal.legcount is " + Integer.getInteger("local.animal.legcount"));
}

From source file:Main.java

public static void main(String[] args) {
    System.out.println(System.getProperty("java.runtime.version"));

    Properties p = System.getProperties();
    p.put("java.runtime.version", "Java Runtime 1.6.0");
    System.setProperties(p);//from   w  w w .  j ava2 s.co  m

    System.out.println(System.getProperty("java.runtime.version"));
}

From source file:SystemApp.java

public static void main(String args[]) {
    long time = System.currentTimeMillis();
    System.out.println(time);//from   w  ww . ja  va  2 s.co  m
    Properties p = System.getProperties();
    p.list(System.out);
    System.exit(13);
}