I have a 64bit operating system with phpStorm 9.0.2 installed.
I get out of memory errors and it seems like JVM32bit might not help the cause.
How can I upgrade my JVM32bit version to JVM64bit?
Is it just as simple as downloading a 64bit version and installing it or are there any other extra steps to take to do this correctly?
OS Win 7 64bit
You can run PhpStorm even if you have no Java installed on your computer as on Windows it comes bundled with own 32-bit JRE which will be used by default ignoring your system-wide Java (if you have one).
That's why "uninstall 32-bit Java and just install 64-bit one instead" is not enough (as in some cases you simply have no system-wide Java installed on your computer).
Download and install 64-bit JDK (yes, it has to be JDK and not just JRE)
Create IDEA_JDK_64 environment variable and point it to JDK root folder. For example:
Use 64-bit PhpStorm's executable (PhpStorm64.exe) instead of 32-bit (PhpStorm.exe).
The above works just fine for me.
If anything -- please refer to official support article.
Related
Seems there are no 32-bit download packages on
Oracle's available download list.
UPDATE
Can download here:
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/9+181/jdk-9_windows-x86_bin.exe
Although the 32-bit binaries for JDK9 seem to be missing from Oracle's lousy, unencrypted download page, if (after clicking "Accept License Agreement") you copy the URL of the 64-bit binaries and change x64 to x86, it will give you the 32-bit binaries.
Update: And now it's gone. Bizarre! What is Oracle playing at? They went to the effort to fix x86-specific bugs for Java 9, they explicitly said 32-bit Windows and Linux were supported, they list installation instructions for 32-bit systems, they made 32-bit builds fully available throughout the pre-release period for testing purposes, and nothing in their JDK 9 migration guide indicates that 32-bit platforms have been dropped (quite the opposite in fact: it says the -client VM command line option has been dropped so the faster -server VM is now the default for 32-bit).
So why are they suddenly hiding the release binaries?
I happened to have downloaded the Windows JDK (including JRE) and the Linux JRE for x86. I don't have the Linux JDK. There's an Oracle digital signature in the properties of the Windows exe so you can see that it's genuine. I do hope Oracle get their act together.
jdk-9_windows-x86_bin.exe: https://drive.google.com/uc?id=0B4RBD9LUbdlvUHpESXdEMmdudkE&export=download
(SHA256: 62b9bc12ea64e9edb9950b0c784a1561b8503f7384270659ad93d66f1b3b456a)
jre-9_linux-x86_bin.tar.gz: https://drive.google.com/uc?id=0B4RBD9LUbdlvb0dtOHR0eDVoQWc&export=download
(SHA256: 372fbd6d8dc70c8087c0d3547f58d593266cf26cc4f6c6698b808930b3a4018a)
jre-9_windows-x86_bin.exe
(SHA256: bbd0e75dc6360e903dd905f080e1a1d76c9c78a27d9f7dd153c6e3adc6ebc78e)
Update 2: Apparently Oracle has decided to eliminate support for x86 Java forever. They somehow finished, compiled, digitally signed, and published the Java 9 binaries by accident. The binaries still work, but presumably will not receive updates.
Update 3: Apparently Oracle has become so hateful and hostile towards Java developers that they have compelled Google to block the above downloads with a DMCA request. Nothing I can do. Sorry. If you have Java 9, you have it, and it will still work. If you don't have Java 9, well, you'll have to get creative.
Chief Java Architect Mark Reinhold in Twitter on September 25:
Sorry, but we have no plans to ship 32-bit builds of JDK 9. We’re
trying to focus more on the future than the past.
Yes, you can build your own 32-bit JDK 9 binaries.
I found a Win32 build here: https://github.com/ojdkbuild/ojdkbuild
This is a OpenJDK provided by RedHat (without support), no idea if they will provide those builds in future.
Oracle has dropped Windows 32-bit Client VM
However: The statement there "In JDK 9, the Windows 32–bit client VM is not available. Only a server VM is offered." is not even accurate, there is not even 32-bit server VM (as of Sep 27, 2017).
Update: Not just Windows, but no 32-bit for any platform is available.
Try the below link for openJDK, offers X86 (32bit) and X64 (64bit) for most java versions
https://adoptopenjdk.net/releases.html?variant=openjdk16&jvmVariant=hotspot
Dropped Windows 32–bit Client VM: In JDK 9, the Windows 32–bit client VM is not available.
data source
Seems there are no 32-bit download packages on
Oracle's available download list.
UPDATE
Can download here:
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/9+181/jdk-9_windows-x86_bin.exe
Although the 32-bit binaries for JDK9 seem to be missing from Oracle's lousy, unencrypted download page, if (after clicking "Accept License Agreement") you copy the URL of the 64-bit binaries and change x64 to x86, it will give you the 32-bit binaries.
Update: And now it's gone. Bizarre! What is Oracle playing at? They went to the effort to fix x86-specific bugs for Java 9, they explicitly said 32-bit Windows and Linux were supported, they list installation instructions for 32-bit systems, they made 32-bit builds fully available throughout the pre-release period for testing purposes, and nothing in their JDK 9 migration guide indicates that 32-bit platforms have been dropped (quite the opposite in fact: it says the -client VM command line option has been dropped so the faster -server VM is now the default for 32-bit).
So why are they suddenly hiding the release binaries?
I happened to have downloaded the Windows JDK (including JRE) and the Linux JRE for x86. I don't have the Linux JDK. There's an Oracle digital signature in the properties of the Windows exe so you can see that it's genuine. I do hope Oracle get their act together.
jdk-9_windows-x86_bin.exe: https://drive.google.com/uc?id=0B4RBD9LUbdlvUHpESXdEMmdudkE&export=download
(SHA256: 62b9bc12ea64e9edb9950b0c784a1561b8503f7384270659ad93d66f1b3b456a)
jre-9_linux-x86_bin.tar.gz: https://drive.google.com/uc?id=0B4RBD9LUbdlvb0dtOHR0eDVoQWc&export=download
(SHA256: 372fbd6d8dc70c8087c0d3547f58d593266cf26cc4f6c6698b808930b3a4018a)
jre-9_windows-x86_bin.exe
(SHA256: bbd0e75dc6360e903dd905f080e1a1d76c9c78a27d9f7dd153c6e3adc6ebc78e)
Update 2: Apparently Oracle has decided to eliminate support for x86 Java forever. They somehow finished, compiled, digitally signed, and published the Java 9 binaries by accident. The binaries still work, but presumably will not receive updates.
Update 3: Apparently Oracle has become so hateful and hostile towards Java developers that they have compelled Google to block the above downloads with a DMCA request. Nothing I can do. Sorry. If you have Java 9, you have it, and it will still work. If you don't have Java 9, well, you'll have to get creative.
Chief Java Architect Mark Reinhold in Twitter on September 25:
Sorry, but we have no plans to ship 32-bit builds of JDK 9. We’re
trying to focus more on the future than the past.
Yes, you can build your own 32-bit JDK 9 binaries.
I found a Win32 build here: https://github.com/ojdkbuild/ojdkbuild
This is a OpenJDK provided by RedHat (without support), no idea if they will provide those builds in future.
Oracle has dropped Windows 32-bit Client VM
However: The statement there "In JDK 9, the Windows 32–bit client VM is not available. Only a server VM is offered." is not even accurate, there is not even 32-bit server VM (as of Sep 27, 2017).
Update: Not just Windows, but no 32-bit for any platform is available.
Try the below link for openJDK, offers X86 (32bit) and X64 (64bit) for most java versions
https://adoptopenjdk.net/releases.html?variant=openjdk16&jvmVariant=hotspot
Dropped Windows 32–bit Client VM: In JDK 9, the Windows 32–bit client VM is not available.
data source
My OS is win7 x64, and java.com recommend that using java x86 version in your OS x64 or you can install x86 and x64 both in your OS, but the path of Java_Home (JDK or JRE) can using the x86 and x64 at the same time?
sorry for the page is Chinese...
https://www.java.com/zh_TW/download/faq/java_win64bit.xml
Your path can include as many versions as you like however only the first version in your PATH will be the one chosen. This is how a PATH work. On all operating systems. This is how the class path also works.
I recommend using the x64 where ever possible on an x64 operating system because unless you have 32-bit DLLs, or running Java in a 32-bit browser, you are better off using the x64 version.
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
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.
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.
You can have both 32bit and 64 bit installed on the same machine. Infact you can have multiple version of each of 32bit and 64bit installed (eg - java6 and java7). Because each JRE will be installed in different folders, it usually does not matter.
When running different versions of jre, your application will search for the Java executable using the PATH variable. So if Java 32bit is first on the PATH, you will have problems running a Java 64bit application. You can modify the path to use a certain Java version e.g. by defining a environment variable JAVA32HOME with the value C:\java\java6 (32bit) and change the command to
%JAVA32HOME%\bin\java ...
Or you can manually add the version you want to use, first in the PATH variable. Remember the first instance of java.exe found while searching your PATH will be the one that is executed.
Why don't you just install the 32-bit version of Java as well from the link below:
Java Downloads for All Operating Systems
Consider going to your settings , choosing your active profile then click on advanced settings , now on the menu that pops up and choose the version you would like to work with . Once everything is configured use the terminal to verify the usage of the right version. Now incaqse thus pdate-alternatives --config java. through the terminal and update any values by selecting the version you like and pressing down on the enter key on the output you get
I have downloaded and installed IDEA 13.1. However, even having a 64-bit system, Windows has automatically installed the program in the folder Program Files (x86), which is dedicated for 32-bit programs.
Is there another download for the 64-bit version or maybe a special setting to make it suitable for a 64-bit system?
In C:\Program Files (x86)\JetBrains\${Intellij Idea version}\bin, there is an executable called idea64.exe. This is for 64-bit systems. You can simply change your IntelliJ shortcut path to it.
You also need to add a new environment variable IDEA_JDK_64 pointing to your 64-bit JDK so IntelliJ can use a 64-bit JDK.
idea64.exe uses this JDK search sequence:
IDEA_JDK_64 environment variable
..\jre64 directory
system Registry
JDK_HOME environment variable
JAVA_HOME environment variable
More can be found in a related IntelliJ support article.
If installing latest version as of today 2016.3.2, while installing the installation wizard prompts to either choose 32-bit or 64-bit.
You need to install the Java SDK 64bit so it shows the options to install IntelliJ 64bit.