This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Problem with Locale.getISOCountries() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with Locale.getISOCountries()" Watch "Problem with Locale.getISOCountries()" New topic

Problem with Locale.getISOCountries()

Manuel Rivero

Joined: Mar 16, 2009
Posts: 2

I'm trying to run this code in order to see how Locale.getISOCountries() works:

When I run it, I get:

I've printed System.out.println(countries.length); and it's 0.

That's not what I expected...

What might be the problem?

I'm working on Ubuntu 8.10 using:

Thanks in advance.

Best regards,
Paul Clapham

Joined: Oct 14, 2005
Posts: 19338

You're using GNU Java? It's well-known for being incomplete. Try downloading a standard Java implementation from Oracle instead.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 41065
And welcome to the Ranch
Manuel Rivero

Joined: Mar 16, 2009
Posts: 2

Yes, I was using Gnu Java. I installed the last version of the JDK from Sun/Oracle and now works fine.

Thank you very much for the advise and the welcoming.

Best regards,
I agree. Here's the link:
subject: Problem with Locale.getISOCountries()