How do I get my JRE to actually run in 32 bit mode?

83 Views Asked by At

A library that I wanted to use needed a 32 bit .dll file.

This did not work, and I did some research and I found that the solution was to switch to a 32 bit JRE, because the 64 bit JRE could not run the 32 bit dll.

I downloaded the x86 JDK. I am working in Eclipse, so I pointed Eclipse to use the new 32 bit Java in preferences.

However, I still get the same problem loading the dll file.

When I do tests like:

System.getProperty("sun.arch.data.model");

or

System.getProperty("os.arch");

It looks like somehow I am still running the 64 bit version of Java. The change I made, switching to the new JRE in preferences, did not take somehow.

How do I get Java to actually run in the 32 bit mode?

1

There are 1 best solutions below

0
On

Ok, I've worked it out.

I set eclipse to use the new JRE in preferences, but the project was still using the old JRE.

You can fix this by going to "Run Configurations" for the file you want to run, and then the JRE tab.

In this menu it was clear that it was still using the old JRE, and I could switch it to the new one.