Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: non-static method cannot be referenced from a static context

Reply
Thread Tools

Re: non-static method cannot be referenced from a static context

 
 
Johannes Beekhuizen
Guest
Posts: n/a
 
      08-05-2005
Hallo dave,

Op 05 Aug 05 schreef http://www.velocityreviews.com/forums/(E-Mail Removed) aan All:

d> // String envLang = System.getenv("LANG"); // Wordt niet meer
d> ondersteund.

What should I use instead then? The idea is that the user gets the default
language from his login environment [Linux]. Usually this will be Dutch, but I
know at least one who prefers Spanish.

Groetjes,

Hans.

 
Reply With Quote
 
 
 
 
Thomas Fritsch
Guest
Posts: n/a
 
      08-05-2005
Johannes Beekhuizen wrote:

>
> d> // String envLang = System.getenv("LANG"); // Wordt niet meer
> d> ondersteund.
>
> What should I use instead then? The idea is that the user gets the default
> language from his login environment [Linux]. Usually this will be Dutch, but I
> know at least one who prefers Spanish.

You can use
String envLang = Locale.getDefault().getLanguage();
instead. More info is in the javadoc of class java.util.Locale .

--
"Thomas:Fritsch$ops:de".replace(':','.').replace(' $','@')

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: non-static method cannot be referenced from a static context Johannes Beekhuizen Java 0 08-05-2005 05:33 PM
non-static method cannot be referenced from a static context Johannes Beekhuizen Java 14 08-05-2005 04:48 PM
newbie Java question - non-static method cannot be referenced from a static context G. Burton Java 2 02-21-2004 07:45 PM
Question: non-static method dummy(int) cannot be referenced from a static context Michael Java 3 01-27-2004 08:45 PM
Please help: Non-static method wait(long) cannot be referenced from static context Gary Java 1 01-16-2004 11:35 PM



Advertisments