由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - user.region or default locale question
相关主题
java date question哪位在自己的website里用过google search bar?给回答一下基础问题吧
Re: JDBC 处理日期的问题(日期插入数据库)JAVA里什么METHOD是用来STRING PATTERN SEARCH
Java练习题 1Is there a way to match whole word only in FF?
ThreadLocal 的一个 use caseopen source java programs/tools database
更好的使用googleonline Java test
Who can help for DFS search program?Web App framework in Java ?
struts 问题求教how to start a local program
Java Regular Expression QuestionLocal file access issue with Applet
相关话题的讨论汇总
话题: locale话题: xp话题: default话题: question话题: java
进入Java版参与讨论
1 (共1页)
m****s
发帖数: 9
1
I am running windows XP.
I just wrote a simple clien testing SimpleDateFormat.
I defined the format to be "MMM dd yyyy" which should take in letters for
month and digits for day and year. When I call the parse method with "Oct 19
2003" it actually failed on parseException.
After a few searches around, it might be related to user.region or default
locale problem. mine for some reason is set to user.region=cn.
Does anyone know how to change it within XP(not in java code) to us?
thanks a lot
c******s
发帖数: 8
2
what's the exception details? it should work I believe.

【在 m****s 的大作中提到】
: I am running windows XP.
: I just wrote a simple clien testing SimpleDateFormat.
: I defined the format to be "MMM dd yyyy" which should take in letters for
: month and digits for day and year. When I call the parse method with "Oct 19
: 2003" it actually failed on parseException.
: After a few searches around, it might be related to user.region or default
: locale problem. mine for some reason is set to user.region=cn.
: Does anyone know how to change it within XP(not in java code) to us?
: thanks a lot

f********h
发帖数: 149
3
I believe you can just pass it to java as java -Duser.region=whatever_you_want

【在 m****s 的大作中提到】
: I am running windows XP.
: I just wrote a simple clien testing SimpleDateFormat.
: I defined the format to be "MMM dd yyyy" which should take in letters for
: month and digits for day and year. When I call the parse method with "Oct 19
: 2003" it actually failed on parseException.
: After a few searches around, it might be related to user.region or default
: locale problem. mine for some reason is set to user.region=cn.
: Does anyone know how to change it within XP(not in java code) to us?
: thanks a lot

1 (共1页)
进入Java版参与讨论
相关主题
Local file access issue with Applet更好的使用google
how to set java run time locale/encoding?Who can help for DFS search program?
Re: how to set java run time locale/encostruts 问题求教
int --> String?Java Regular Expression Question
java date question哪位在自己的website里用过google search bar?给回答一下基础问题吧
Re: JDBC 处理日期的问题(日期插入数据库)JAVA里什么METHOD是用来STRING PATTERN SEARCH
Java练习题 1Is there a way to match whole word only in FF?
ThreadLocal 的一个 use caseopen source java programs/tools database
相关话题的讨论汇总
话题: locale话题: xp话题: default话题: question话题: java