import java.util.*; import java.text.*; public class Env { 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); } }
2. 输出如下
======System available locales:========
ja_JP Japanese (Japan)
es_PE Spanish (Peru)
en English
ja_JP_JP Japanese (Japan,JP)
es_PA Spanish (Panama)
sr_BA Serbian (Bosnia and Herzegovina)
mk Macedonian
es_GT Spanish (Guatemala)
ar_AE Arabic (United Arab Emirates)
no_NO Norwegian (Norway)
sq_AL Albanian (Albania)
bg Bulgarian
ar_IQ Arabic (Iraq)
ar_YE Arabic (Yemen)
hu Hungarian
pt_PT Portuguese (Portugal)
el_CY Greek (Cyprus)
ar_QA Arabic (Qatar)
mk_MK Macedonian (Macedonia)
sv Swedish
de_CH German (Switzerland)
en_US English (United States)
fi_FI Finnish (Finland)
is Icelandic
cs Czech
en_MT English (Malta)
sl_SI Slovenian (Slovenia)
sk_SK Slovak (Slovakia)
it Italian
tr_TR Turkish (Turkey)
zh Chinese
th Thai
ar_SA Arabic (Saudi Arabia)
no Norwegian
en_GB English (United Kingdom)
sr_CS Serbian (Serbia and Montenegro)
lt Lithuanian
ro Romanian
en_NZ English (New Zealand)
no_NO_NY Norwegian (Norway,Nynorsk)
lt_LT Lithuanian (Lithuania)
es_NI Spanish (Nicaragua)
nl Dutch
ga_IE Irish (Ireland)
fr_BE French (Belgium)
es_ES Spanish (Spain)
ar_LB Arabic (Lebanon)
ko Korean
fr_CA French (Canada)
et_EE Estonian (Estonia)
ar_KW Arabic (Kuwait)
sr_RS Serbian (Serbia)
es_US Spanish (United States)
es_MX Spanish (Mexico)
ar_SD Arabic (Sudan)
in_ID Indonesian (Indonesia)
ru Russian
lv Latvian
es_UY Spanish (Uruguay)
lv_LV Latvian (Latvia)
iw Hebrew
pt_BR Portuguese (Brazil)
ar_SY Arabic (Syria)
hr Croatian
et Estonian
es_DO Spanish (Dominican Republic)
fr_CH French (Switzerland)
hi_IN Hindi (India)
es_VE Spanish (Venezuela)
ar_BH Arabic (Bahrain)
en_PH English (Philippines)
ar_TN Arabic (Tunisia)
fi Finnish
de_AT German (Austria)
es Spanish
nl_NL Dutch (Netherlands)
es_EC Spanish (Ecuador)
zh_TW Chinese (Taiwan)
ar_JO Arabic (Jordan)
be Belarusian
is_IS Icelandic (Iceland)
es_CO Spanish (Colombia)
es_CR Spanish (Costa Rica)
es_CL Spanish (Chile)
ar_EG Arabic (Egypt)
en_ZA English (South Africa)
th_TH Thai (Thailand)
el_GR Greek (Greece)
it_IT Italian (Italy)
ca Catalan
hu_HU Hungarian (Hungary)
fr French
en_IE English (Ireland)
uk_UA Ukrainian (Ukraine)
pl_PL Polish (Poland)
fr_LU French (Luxembourg)
nl_BE Dutch (Belgium)
en_IN English (India)
ca_ES Catalan (Spain)
ar_MA Arabic (Morocco)
es_BO Spanish (Bolivia)
en_AU English (Australia)
sr Serbian
zh_SG Chinese (Singapore)
pt Portuguese
uk Ukrainian
es_SV Spanish (El Salvador)
ru_RU Russian (Russia)
ko_KR Korean (South Korea)
vi Vietnamese
ar_DZ Arabic (Algeria)
vi_VN Vietnamese (Vietnam)
sr_ME Serbian (Montenegro)
sq Albanian
ar_LY Arabic (Libya)
ar Arabic
zh_CN Chinese (China)
be_BY Belarusian (Belarus)
zh_HK Chinese (Hong Kong)
ja Japanese
iw_IL Hebrew (Israel)
bg_BG Bulgarian (Bulgaria)
in Indonesian
mt_MT Maltese (Malta)
es_PY Spanish (Paraguay)
sl Slovenian
fr_FR French (France)
cs_CZ Czech (Czech Republic)
it_CH Italian (Switzerland)
ro_RO Romanian (Romania)
es_PR Spanish (Puerto Rico)
en_CA English (Canada)
de_DE German (Germany)
ga Irish
de_LU German (Luxembourg)
de German
es_AR Spanish (Argentina)
sk Slovak
ms_MY Malay (Malaysia)
hr_HR Croatian (Croatia)
en_SG English (Singapore)
da Danish
mt Maltese
pl Polish
ar_OM Arabic (Oman)
tr Turkish
th_TH_TH Thai (Thailand,TH)
el Greek
ms Malay
sv_SE Swedish (Sweden)
da_DK Danish (Denmark)
es_HN Spanish (Honduras)
======System property========
-- listing properties --
java.runtime.name=Java(TM) SE Runtime Environment
sun.boot.library.path=C:\Oracle\Java\jdk1.6.0_25\jre\bin
java.vm.version=20.7-b02
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=;
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg=sun.io
user.country=US
sun.java.launcher=SUN_STANDARD
sun.os.patch.level=Service Pack 1
java.vm.specification.name=Java Virtual Machine Specification
user.dir=C:\
java.runtime.version=1.6.0_32-b05
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\Oracle\Java\jdk1.6.0_25\jre\lib\en...
os.arch=amd64
java.io.tmpdir=C:\Users\pmma\AppData\Local\Temp\
line.separator=
java.vm.specification.vendor=Sun Microsystems Inc.
user.variant=
os.name=Windows 7
sun.jnu.encoding=GBK
java.library.path=C:\Oracle\Java\jdk1.6.0_25\bin;C:\win...
java.specification.name=Java Platform API Specification
java.class.version=50.0
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
os.version=6.1
user.home=C:\Users\pmma
user.timezone=Asia/Shanghai
java.awt.printerjob=sun.awt.windows.WPrinterJob
file.encoding=Cp1252
java.specification.version=1.6
user.name=pmma
java.class.path=.
java.vm.specification.version=1.0
sun.arch.data.model=64
java.home=C:\Oracle\Java\jdk1.6.0_25\jre
sun.java.command=Env
java.specification.vendor=Sun Microsystems Inc.
user.language=en
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode
java.version=1.6.0_32
java.ext.dirs=C:\Oracle\Java\jdk1.6.0_25\jre\lib\ex...
sun.boot.class.path=C:\Oracle\Java\jdk1.6.0_25\jre\lib\re...
java.vendor=Sun Microsystems Inc.
file.separator=\
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
sun.desktop=windows
sun.cpu.isalist=amd64
没有评论:
发表评论