This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 18541

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: 37941
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()
Similar Threads
function firing before page loads?
Null objects
Values not poulating in the dropdown box.
struts2 decimal point or decimal comma
question about locale