Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running java in 32 bit mode on windows 64

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

like image 561
lviggiani Avatar asked Jun 03 '14 07:06

lviggiani


1 Answers

According to this FAQ :

How do I select between 32 and 64-bit operation? What's the default?

The options -d32 and -d64 have been added to the Java launcher to specify whether the program is to be run in a 32 or 64-bit environment. On Solaris these correspond to the ILP32 and LP64 data models, respectively. Since Solaris has both a 32 and 64-bit J2SE implementation contained within the same installation of Java, you can specify either version. If neither -d32 nor -d64 is specified, the default is to run in a 32-bit environment. Other Java commands (javac, javadoc, etc.) will rarely need to be executed in a 64-bit environment. However, the -d32/-d64 options may be passed to these commands and then on to the Java launcher using the established -J prefix option (eg: -J-d64).
All other platforms (Windows and Linux) contain separate 32 and 64-bit installation packages. If both packages are installed on a system, you select one or the other by adding the appropriate "bin" directory to your path. For consistency, the Java implementations on Linux accept the -d64 option.

like image 99
RealHowTo Avatar answered Sep 30 '22 15:09

RealHowTo