Hello stackoverflow community,
I'm using NetBeans IDE 7.2.1, and I'm trying to compile+run a project with native libraries. My libraries require a 32 bit JVM. I'm running Windows 7 64-bit. When attempting to compile+run my project I'm met with the following:
Error: This Java instance does not support a 32-bit JVM.
Please install the desired version.
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
-d32 -vm "C:\Program Files (x86)\Java\jre7\bin\javaw.exe"
-vm "C:\Program Files (x86)\Java\jre7\bin\javaw.exe"
When you start a process (for example on the command prompt, but it's the same AFAIK when you start another process from code) a certain group of paths (contained in the PATH (?) environment variable) is searched for an executable with a name matching what you entered. If the 64-bit and 32-bit version have the same name and the 64-bit version is found first, that one will be executed. I recommend specifying the full path of the 32-bit JDK.
I just saw the question is about the NetBeans IDE. I've never used that, so the only advice I can give you is to look in NetBeans' settings, and adjust the path to the JDK and JRE, making it point to the 32-bit version. I'll leave my answer here for people not using NetBeans.