/* * Copyright (c) 2002-2003 Che, Dong Email: chedongATbigfoot.com/chedongATchedong.com * $Id: Env.java,v 1.3 2003/03/09 08:41:46 chedong Exp $ */ import java.text.DateFormat; import java.util.Date; import java.util.Locale; /** * 目的: * 显示环境变量和JVM的缺省属性 * 输入:无 * 输出: * 1 支持的LOCALE * 2 JVM的缺省属性 * @author Che, Dong */ public class Env { /** * main entrance * @param args command line arguments */ public static void main(String[] args) { System.out.println("Hello, it's: " + new Date()); //print available locales Locale[] list = DateFormat.getAvailableLocales(); System.out.println("======System available locales:======== "); for (int i = 0; i < list.length; i++) { System.out.println(list[i].toString() + "\t" + list[i].getDisplayName()); } //print JVM default properties System.out.println("======System property======== "); System.getProperties().list(System.out); } }