java获得java的变量设置 envSnoop

// determine environment variables
import java.util.*;
class envSnoop {
  public static void main ( String args[] ) {
    Properties p;
    String s;
    p = System.getProperties();
    p.list(System.out);
    s = System.getProperty("user.name");
    System.out.println("user.name="+s);
    s = System.getProperty("user.home");
    System.out.println("user.home="+s);
  }
}

你可能感兴趣的:(java获得java的变量设置 envSnoop)