I need to run java in 32 bit mode under windows 8.1 64 bit.
I have installed java 7 jre under c:\Program Files\Java\jre7
(64bit JVM) and under c:\Program Files (x86)\Java\jre7
(32bit JVM).
However, if from cmd I issue java -d32 -version
, I get this error:
Error: This Java instance does not support a 32-bit JVM.
Please install the desired version.
Without the -d32
switch it confirms its running the 64 bit JVM:
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
So I opened the java control panel and added the 32bit JVM to the user installed JRE (system tab does not allow me to change anything even if running as administrator), but nothing changes.
I've read some posts of users saying that with java 7+ the -d32
mode should be supported but I can't get it.
Note: Please note that I cannot remove the 64bit JVM because I need it for other applications
I've found another solution to that. By using launchj4 I can wrap my jar into an exe and I can specify the JRE I want to use and force it to search for a 32bit JVM, set min and max version etc (see the JRE). The wrapper will automatically search installed JRE's and chose the one that meets the requirements.
Also wrapping my jar into an exe is more convenient for deploying my application.