• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Run an applet using japanese language

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 513
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic