Hello,
I have simple question that i can't resolve.
I am working on JavaFX application in which I am using DatePicker. This part is not important.
My date picker is formating date based on my Windows 7 OS Regional and Language settings(Formats).
This part is now relevant:
In order to try to make my app Regional independant, and show date format always as US, I only once used this line of code:
Locale.setDefault(Locale.ENGLISH);
Here is problem:
Now when I remove this line of code "Locale.setDefault(Locale.ENGLISH)" my application is no longer able to get Regional format from my Windows 7 OS Regional and Language settings(Formats). Locale informations are permanently lost in JVM. Things are even worse, because my JDBC connection is not working now, and it reports:
java.sql.SQLException: Locale not recognized
at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:1006)...
How can I revert to old JVM behaviour, and get Locale information from my Windows 7 OS Regional and Language settings(Formats) automatically? Any help?
The application now is only working when there is Locale.setDefault(Locale.ENGLISH); line in code.