• Post Reply Bookmark Topic Watch Topic
  • New Topic

Run an applet using japanese language  RSS feed

 
Matthew Shapiro
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I can run my code in a japanese language by providing the following VM argument.

-Duser.language=ja

But how do i set my machine up to do this instead of having to provide a vm argument?

I have tried in regional and language options in the control panel of xp but the language is only set if i set the locale to japan.

any ideas? Thanks in advance

Ben
 
Rob Spoor
Sheriff
Posts: 21095
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set the locale in Java as well. In java.util.Locale, there is a static method called setDefault, with which you can set the default locale.
 
Kelvin Chenhao Lim
Ranch Hand
Posts: 513
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Benjamin,

There's no standard way to set the default language; this is specific to each JVM implementation and host platform. For most Windows JVMs, the procedure for doing this is the one you already described: changing the locale in the Control Panel settings.

If this isn't appropriate for what you need to do, then you'll just have to use the command-line option you mentioned. Some JVMs allow you to specify command-line options in an environment variable, or to read system properties from a file, so you may want to see if those approaches apply to your JVM.
 
Matthew Shapiro
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your replies guys...

unfortunately i am not able to use vm arguments. So have come up with a way to keep the properties on a server file which the user can update which will in turn change the language to japanese. A bit of a hack, but no other way i have found works.

Ben
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!