kazanaki kazanaki - 6 months ago 63
Java Question

Setting default locale for Tomcat Service in Windows XP

I have installed Apache Tomcat 6 as a Service in a Windows XP computer (French)

My problem is that Tomcat itself and all webapps (Sonar and Hudson) now show french messages.
I want English messages of course so I went to the "Regional Settings" window in Control panel and changed everything to English (US)

Tomcat however is still in French. Nothing changed at all.

I suspect that because it runs as a service it does not pick the settings from control panel.

So is there any way to trick the Tomcat JVM so that it uses English instead of French?
I have sys admin access to the machine (XP PRO French)

Thank you


You need to set user.language and user.region appropriately,


java -Duser.language=en -Duser.region=CA

in your Tomcat startup (probably catalina.bat). Check this link for more info, and for references to the sets of valid ISO codes for the above.