Posts Tagged ‘windows 7’

Since I could not find an easy solution for this problem I have decided to blog about this.

Lets say your machine (running Windows 7) is running in a Dutch locale. If you install the JDK and request the default locale in your application you will get: nl_NL

I’m testing this with the following code:

import java.util.Locale;

public class DefaultLocaleTester {

	public static void main(String[] args) {
		Locale defaultLocale = Locale.getDefault();
		System.out.println("Default locale is : " + defaultLocale);
	}
}

Lets say I want to make this return en_US. The official docs of Oracle say that you should change your system settings:

- go to Control Panel
- go to Region and Language
- go to tab “Administrative”
- click “Change system locale”
- change to locale you want
- restart and you’re done!

So we do this, and we run the test application again.

You will found out, this will not work. When I rerun the test application I still got nl_NL.

On stackoverflow someone had the answer to this problem. You should be changing your Format instead. So:

- go to Control Panel
- go to Region and Language
- go to tab “Formats” (is default selected)
- change language in Formats dropdown to the locale you want

Now re-run the test code, and you’ll see it will be using the locale you want.

Thanks to Martin Bartlett on Stackoverflow for his answer!

Note: This post offers a Windows JAR/DLL package. I have delivered a newer version, also for Linux/Mac OS X. Get them from here

A long while ago I played around with Slick. A game library for Java. It offers easy 2d graphics drawing with the speed of OpenGL (by using LJWGL). It has much more features than that as well. 

When I tried it I was running Win XP 32 bit. However, recently I was trying my code again, this time on Windows 7 64 bit, and I encountered the following error:

lwjgl.dll: Can’t load IA 32-bit .dll on a AMD 64-bit platform

I could not find a decent solution easily, but I fixed it by doing this:
- Get the latest source of Slick
- Download the latest LJWGL version
- Use the latest LJWGL JAR and DLL files and put them into the latest source code of Slick
- Run “ant dist” of Slick

Use the newly generated JAR of Slick and the new DLL files of LJWGL together, and you’re all set for 32 AND 64 bit!

If you just want to download everything (DLL and JAR’s), I’ve made a little archive for Windows users. It is unofficial though, no support given!. Grab it from here.