Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » eclipse takes OS language as default - how to disable?
eclipse takes OS language as default - how to disable? [message #781122] Fri, 20 January 2012 15:54 Go to next message
Ben S. is currently offline Ben S.Friend
Messages: 6
Registered: January 2012
Junior Member
Yeah, I got my eclipse in english and want to program in english.
but when I test my programs within eclipse using the scanner class and typing a double number like 100.00 I get a InputMismatchException.
Fair enough, makes sense because the scanner uses invisible the locale language of the OS (which is german) and expects 100,00.
My question is now:

How can I tell eclipse not to use my OS language as ANY default?
I dont want to set that for each class manually all the time...


I already tried Window -> Preferences -> Java -> Installed JREs ->
Edit -> Default VM Arguments: -Duser.language=en -Duser.country=US -Duser.variant=EN

and to write something I found on google into the eclipse.ini but nothing worked at all.


Does anybody know the problem?

Re: eclipse takes OS language as default - how to disable? [message #781132 is a reply to message #781122] Fri, 20 January 2012 16:37 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
On 20.01.2012 16:54, Ben S. wrote:
> Yeah, I got my eclipse in english and want to program in english.
> but when I test my programs within eclipse using the scanner class and
> typing a double number like 100.00 I get a InputMismatchException.
> Fair enough, makes sense because the scanner uses invisible the locale
> language of the OS (which is german) and expects 100,00.
> My question is now:
>
> How can I tell eclipse not to use my OS language as ANY default?
> I dont want to set that for each class manually all the time...
>
>
> I already tried Window -> Preferences -> Java -> Installed JREs ->
> Edit -> Default VM Arguments: -Duser.language=en -Duser.country=US
> -Duser.variant=EN
This works for me for the 'Java Application' launches.

Dani
>
> and to write something I found on google into the eclipse.ini but
> nothing worked at all.
>
>
> Does anybody know the problem?
>
>
Re: eclipse takes OS language as default - how to disable? [message #782136 is a reply to message #781132] Mon, 23 January 2012 08:38 Go to previous messageGo to next message
Ben S. is currently offline Ben S.Friend
Messages: 6
Registered: January 2012
Junior Member
>> I already tried Window -> Preferences -> Java -> Installed JREs ->
>> Edit -> Default VM Arguments: -Duser.language=en -Duser.country=US
>> -Duser.variant=EN

>This works for me for the 'Java Application' launches.

>Dani


What do you mean exactly? I always run it as Java Application within eclipse but even with the parameters mentioned its not working at all. Should be a common problem if you use another OS language than english (including other number format).
Re: eclipse takes OS language as default - how to disable? [message #782148 is a reply to message #782136] Mon, 23 January 2012 09:01 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
On 23.01.2012 09:38, Ben S. wrote:
>>> I already tried Window -> Preferences -> Java -> Installed JREs ->
>>> Edit -> Default VM Arguments: -Duser.language=en -Duser.country=US
>>> -Duser.variant=EN
>
>> This works for me for the 'Java Application' launches.
>
>> Dani
>
>
> What do you mean exactly?
I mean, that it honors the default arguments. If that's not the case for
you, then please file a bug with detailed steps to reproduce it.

Dani
> I always run it as Java Application within eclipse but even with the
> parameters mentioned its not working at all. Should be a common
> problem if you use another OS language than english (including other
> number format).
Re: eclipse takes OS language as default - how to disable? [message #782218 is a reply to message #782148] Mon, 23 January 2012 11:09 Go to previous messageGo to next message
Ben S. is currently offline Ben S.Friend
Messages: 6
Registered: January 2012
Junior Member
I am sorry but I dont get you. Perhaps you assume a preknowledge that just isn't there in my case.
The default VM Arguments were empty (before I plugged them in as described).
In my case it seems not to honor them because even with them its not working (within eclipse, didnt try it via console and manual arguments).
So how could I 'file a bug' with detailed steps to reproduce it?
I mean, anybody with a different number format than the english one should have the same problem if they do not want to use their OS language norm.

[Updated on: Mon, 23 January 2012 11:10]

Report message to a moderator

Re: eclipse takes OS language as default - how to disable? [message #782248 is a reply to message #782218] Mon, 23 January 2012 12:09 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
On 23.01.2012 12:09, Ben S. wrote:
> I am sorry but I dont get you. Perhaps you assume a preknowledge that
> just isn't there in my case.
> The default VM Arguments were empty.
Right, initially they are empty. You have to fill in what you like, as
you already posted:

Window -> Preferences -> Java -> Installed JREs -> Edit -> Default VM
Arguments: -Duser.language=en -Duser.country=US -Duser.variant=EN

After that it uses those values whatever OS language is set. But yes,
you manually have to add those. Also, double-check that
- the JRE for which you changed the defaults is used to launch
- the launch config doesn't override the VM arguments

And just to double-check: you launch a simple Java app and not an
Eclipse/RCP app?

Dani

> In my case it seems not to honor them because even with them its not
> working (within eclipse, didnt try it via console and manual arguments).
> So how could I 'file a bug' with detailed steps to reproduce it?
> I mean, anybody with a different number format than the english one
> should have the same problem if they do not want to use their OS
> language norm.
Re: eclipse takes OS language as default - how to disable? [message #782285 is a reply to message #782248] Mon, 23 January 2012 13:06 Go to previous message
Ben S. is currently offline Ben S.Friend
Messages: 6
Registered: January 2012
Junior Member
Thank you!
Problem solved:

had to do the Arguments for the JDK AND the JRE.
(set them only for the JDK first, but the VM uses the general JRE I guess)
Previous Topic:Question about showing tooltips of comment of my own method?
Next Topic:getAppletContext() In Eclipse IDE?
Goto Forum:
  


Current Time: Thu Nov 27 09:50:00 GMT 2014

Powered by FUDForum. Page generated in 0.02918 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software