Do i have to install jdk win64?

srisar picture srisar · Jul 14, 2010 · Viewed 12.4k times · Source

I have installed windows 7 x64, therefore i have a confusion whether i have to install JDK x64 or JDK x86? please help me, thank you

Answer

Jesper picture Jesper · Jul 14, 2010

You dont have to install the x64 version of the JDK if you're running on 64-bit Windows; the x86 (32-bit) version also works on 64-bit Windows. You can even have both the 32-bit and 64-bit version installed at the same time (in different directories, ofcourse).

Ofcourse both have advantages and disadvantages:

  • With the 64-bit version you'll take full advantage of the 64-bit capabilities of your CPU and OS
  • If you have a 32-bit webbrowser (which almost all browsers for Windows are currently), you'll want to install 32-bit Java to be able to run applets in the browser

Also note that there are two versions of Oracles JVM which are tuned differently: the server and the client version. In 64-bit Java, the server JVM is the default, and in the 32-bit version, the client JVM is the default.

Obviously, the server JVM is tuned for server programs: programs that are expected to run for a long time and that need the highest possible performance. The server JVM does more aggressive optimizations, but the startup time of programs is longer.

The client JVM is tuned for client programs: programs that run for a shorter amount of time and that should start up quickly. The client JVM is tuned for starting programs quickly, at the expense of doing less optimizations.

I have a computation-intensive program that I recently tried on both the 64-bit server JVM and the 32-bit client JVM on the same computer. To my surprise, it runs twice as fast on the 64-bit JVM. Note: This does not mean that any program will run twice as fast on a 64-bit JVM (it's just anecdotal evidence with this particular program).