Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JRE Language (Language Locale English/Chinese)

843798Mar 5 2008 — edited Oct 17 2009
I think some developers really got some wrong concepts here...
I have a English version of windows, but my locale set to Chinese for some of the programs I use. This does not mean that I want Java or any of my other programs in Chinese, and I certainly do not want the calendar to be. Recently I installed OpenProj and found a lot of parts including the calendar on the Gant Chart were in Chinese due to JRE taking my system's locale settings. This is all still ok, except for the fact that there is no way to change the language setting. Suggested solution by Sun is to just change the system locale in windows. This is of course not acceptable. Correct solution should be: JRE gets the default setting from the system, but is able to override it with an option.

For those of you who face the same, here is a quick patch which hardcodes the locale instead of getting is from the system:
-This has been done on File version 6.0.50.13 of Java.dll
-Close all programs using Java
-Open a hex editor and open "Java.dll" in "program files/Java/bin" or whereever you installed Java, and go to offset 0x6BD0 (if you have a different version of Java.dll), you can very likely still do a search for the hex values below and find the correct place)
-You will see following values: FF 15 A0 10 32 6D 8B F8 FF 15 A4 10 32 6D 57 89
-Change them to: 68 09* 04* 00 00 58 8B F8 68 09* 04* 00 00 58 57 89

-You can change the values indicated with * to the locale you want JRE to take, please check the link below for all locales.
http://msdn2.microsoft.com/en-us/library/ms776260(VS.85).aspx
Remember to swap the bytes in the values above ie: 0x0409 (en) -> 0x0904.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2009
Added on Mar 5 2008
2 comments
651 views