473,322 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Changing Java's regional setting

Is there a way to tell Java what localization to use so applications and
the compiler doesn't default to the system's setting? I'm using a
computer with Windows 2000 with a regional setting of Japanese. Is there
any way to have Java always use US English rather than the default Japanese?
Jul 17 '05 #1
4 9997
Grumfish wrote:
Is there a way to tell Java what localization to use so applications and
the compiler doesn't default to the system's setting? I'm using a
computer with Windows 2000 with a regional setting of Japanese. Is there
any way to have Java always use US English rather than the default
Japanese?


Locale.setDefault(Locale.US);

Ray

--
XML is the programmer's duct tape.
Jul 17 '05 #2
i should bloody hope so....

http://developers.sun.com/techtopics/global/index.html

http://java.sun.com/developer/codesamples/int.html

- perry
Grumfish wrote:
Is there a way to tell Java what localization to use so applications and
the compiler doesn't default to the system's setting? I'm using a
computer with Windows 2000 with a regional setting of Japanese. Is there
any way to have Java always use US English rather than the default
Japanese?


Jul 17 '05 #3
Raymond DeCampo wrote:

Locale.setDefault(Locale.US);

Ray


This doesn't seem to do what I'm looking for. I checked the docs and
tried a quick program using it and it only seems to change the locale of
that single instance of the application. I would like a way so that
every Java application and the compiler defaults to using English rather
than the system's default locale. Something like a config file or
environment variable that is checked by every instance of Java before
checking the system's setting.
Jul 17 '05 #4
Grumfish wrote:
Raymond DeCampo wrote:

Locale.setDefault(Locale.US);

Ray


This doesn't seem to do what I'm looking for. I checked the docs and
tried a quick program using it and it only seems to change the locale of
that single instance of the application. I would like a way so that
every Java application and the compiler defaults to using English rather
than the system's default locale. Something like a config file or
environment variable that is checked by every instance of Java before
checking the system's setting.


So you want Java and it's tools to run as if the regional settings are
for US even though the OS settings are for Japanese? I don't think that
most programs would bother with adding such functionality; after all, if
the user has his or her regional settings set to something, that's
probably what they want.

I suppose you have some reason for not being able to change the regional
settings in Windows? This would be the most obvious solution.

In that case, I would explore OS-level solutions instead of expecting
the applications to provide this. In particular, I would set up a
second user on the machine with the default regional settings set to US.
Then I would use runas to launch all the programs I would like to
display as US locale. (Look at the runas documents carefully however,
it must be invoked in a particular way to pick up all of the target
user's configuration.)

Ray

--
XML is the programmer's duct tape.
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Cesar Ronchese | last post by:
Hello All! I have a .Net project that, in my machine, the dates are showed in this format: dd/mm/yyyy. But, when I install the project in some customer machines, the date is showed in this...
0
by: HoloDoc | last post by:
Using VB.NET 2003 with .NET 1.1. I am using RSACryptoServiceProvider to encrypt various information. This generally is fine. As part of development for Arabic, i changed option: Control Panel...
2
by: Ralph | last post by:
I'm trying to import a range of cells from an Excel spreadsheet into a table in access. The first row contains column labels, but I cannot use those as my field names, both because of their format...
0
by: Karunakararao | last post by:
Hi Vinay I am not able to get the web application. regional settings made at the operating system level. For example, Canada uses a dd/mm/yyyy format while the US uses mm/dd/yyyy. and yyyy/mm/dd...
7
by: Oleg Konovalov | last post by:
Hi, I am trying to pass a bunch of checked checkboxes (Javascript array) from page1 to the Java action class on subsequent web page (page2). (on page 1 I have a bunch of DB rows with a checkbox,...
16
by: Colmag | last post by:
I've written an application with vb.net 2003 (framework 1.1) which automates a 3rd party viewing/printing application (via an activex control). I've released several versions over the last year...
1
by: progressdll | last post by:
I'm trying to change the behaviour of setting the DataSource property of combobox. Here is the behaviour I now see. Setting the DataSource property of combobox to an ArrayList will visual...
0
by: Alex Fung | last post by:
When I use GotFree Cards (http://www.got-free-ecards.com) to send free e-cards, I come across a problem when selecting the future date for sending the card. The webpage uses javascript and the...
0
by: Alex Fung | last post by:
When I use GotFree Cards (http://www.got-free-ecards.com) to send free e-cards, I come across a problem when selecting the future date for sending the card. The webpage uses JavaScript and the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.