I installed new Java from https://www.java.com/en/ but I am little confused about where installer store the java folder. It is stored in Program Files (x86). I don't understand what it means. I would like to to use 64-bit architecture. Why is it installed in (x86) program folder? Is that mean I am using 32-bit java?
Asked
Active
Viewed 1.9k times
6
-
just check the version to see if it's 64bit... – Jan 14 '16 at 02:22
-
You want to specify the OS you are working on as a tag too. – Alexis Wilke Jan 14 '16 at 02:22
-
1He mentioned a folder called `Program Files`, so he's using Windows most likely. – Tim Biegeleisen Jan 14 '16 at 02:23
-
Java has traditionally been a 32-bit executable, so that is the default version that the website gives, you have to manually select the 64-bit version if you want to use that, same as Chrome or other programs that make both versions available – rlam12 Jan 14 '16 at 02:39
-
Is the 64bit version actually better? Probably doesn't matter for development. – ZhongYu Jan 14 '16 at 02:44
-
64-bit has larger memory limits. At least for initial heap size if not in general. – ChiefTwoPencils Jan 14 '16 at 02:47
-
Of course 64-bit is able to use more memory. But what about programs which are not able to use 64-bit Java? – Čamo Jan 14 '16 at 02:51
-
Please see [this](http://stackoverflow.com/questions/783662/java-32-bit-vs-64-bit-compatibility). – ChiefTwoPencils Jan 14 '16 at 03:24
1 Answers
8
Yes, it appears that you have installed the 32 bit version of Java. You can verify this by opening a Command Prompt, changing to the bin
directory of the Java install, and typing:
java -version
If you are running 64 bit Java 8 you would see something like this:
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
You want to download the Windows version which is labelled Windows x64
.
Here is a link where you can download it.

Tim Biegeleisen
- 502,043
- 27
- 286
- 360
-
Console writes : `java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b18) Java HotSpot(TM) Client VM (build 25.66-b18, mixed mode, sharing)` There is no 64-bit mark. – Čamo Jan 14 '16 at 02:41
-
Bingo. Then download the 64 bit version and off you go. You may also have to set some environment variables if you want the 64 bit version of Java to be your default on Windows. – Tim Biegeleisen Jan 14 '16 at 02:42
-
What should I do with that 32-bit version. I am not sure but some program needs 32-bit version. Can I have both? – Čamo Jan 14 '16 at 02:48
-
You definitely can have both 32 and 64 bit Java installed on the same machine. I have that setup, and I use each for different things. But you may need to adjust your environment variables to choose a default version for Windows to use. – Tim Biegeleisen Jan 14 '16 at 02:49
-
@Čamo you only need 32-bit if you use 32-bit DLLs, otherwise you are better off with the 64-bit JVM. – Peter Lawrey Jan 14 '16 at 02:51
-
1So Java creates virtual machine. It would mean all programs (32/64-bit) using java do not care which architecture java actually use. So why do I need 32-bit version? – Čamo Jan 14 '16 at 04:11
-
@Čamo You are correct, a Java bytecode can run in either a 32 or 64 bit JVM. As Peter mentioned, the only instance where you would need to run in a 32 bit JVM is if you have a 32-bit DLL from a third party, q.v. [this SO article](http://stackoverflow.com/questions/13448761/running-32-bit-dll-on-64-bit-machine-in-java) for more information. – Tim Biegeleisen Jan 14 '16 at 04:18
-
I am not sure what means "third party". From which position(view) we are talking about third party. Third party from JVM view? Cause I use a lot of programs which runs as 32-bit. – Čamo Jan 14 '16 at 05:55
-
1Think of a DLL a custom Windows program that be called by other programs (including Java) running in Windows. Because a DLL is native, it can be either 32 or 64 bit. Java must be able to "speak" to the DLL using the right language, and therefore you must use either a 32 or 64 bit JVM. Bytecode is independent of the instruction width, but DLLs are not. – Tim Biegeleisen Jan 14 '16 at 06:02
-
So if I run IDE as 64-bit and try to call Git which is 32-bit it could be problem? I am going to try it. – Čamo Jan 14 '16 at 06:12