转自:http://www.chedong.com/tech/hello_unicode.html
/*
* Copyright (c) 2002 Email: chedongATbigfoot.com/chedongATchedong.com
* $Id: hello_unicode.html,v 1.6 2003/11/09 07:57:11 chedong Exp $
*/
import java.util.*;
import java.text.*;
/**
* 目的:
* 显示环境变量和JVM的缺省属性
* 输入:无
* 输出:
* 1 支持的LOCALE
* 2 JVM的缺省属性
*/
public class Env {
/**
* main entrance
*/
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);
}
}
[转] 显示环境变量和 JVM 缺省属性的 Java 程序
最新推荐文章于 2025-08-09 19:43:12 发布