retrieve JVM's system locale on WInXP or WIN 2003 using JAVA

Iam using English locale for standards and formats on Reginal options tab tab and system locale as polish on "Language for non-unicode programs on Advanced tab of Win 2003 machine.

I have to retrieve a value using JVM , according to the system locale which is on advanced tab of win2003 or win XP.

For that Iam using java function "getNumberInstance" which will retrieve the default locale.But this uses the user locale on Regional options tab,

But I want to usse the System locale whcih is on Advanced tab.

NumberFormat numFmt = NumberFormat.getNumberInstance();

How to retrieve the locale selected on advanced tab (language for non unicode programs) using java APIs

It will be a great help . Pls suggest your solutions.

Thanks in Advance,

Jyothsna.

[805 byte] By [sun-solvea] at [2007-11-26 14:11:12]
# 1
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Locale.html#getDefault()
ejpa at 2007-7-8 1:59:09 > top of Java-index,Developer Tools,Java Compiler...
# 2

Thanks for the suggestion...

But I would like to get the system locale dynamically that is selected on the advanced tab .

I should not hardcode the locale while coding.

I have to format the numeric values according to the locale that is selected on the Advanced tab( ie: language for non unicode programs")

But when I saygetDefault() JVm always considers the locale present on the "Standards and Formats" of "Regional Options tab ", but not from the "Advanced tab".

The locale on the Regional option is English and locale on the Advanced tab is "Polish".

So I want the values to be formated by the JVM according to the Polish locale but not English.

Please let me know how can I retrueve the locale on Advanced tab dynamically without hardcoding........as its being a customer issue , expecting the solution asap.

Would like to know whether JVm considers the non unicode stuff or not.. or only works for unicode data..... Pls clarify

Looking forward for your quick help... Anyone Pls do answer to it.

sun-solvea at 2007-7-8 1:59:09 > top of Java-index,Developer Tools,Java Compiler...