views:

68

answers:

3

Hi all, 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

+3  A: 

You should install x64 so Java takes advantage of your 64 bit OS.

Jeanne Boyarsky
thanks, will jdk x64 will be compatible with intelliJidea and netbeans??
srisar
srisar: yup, that's the advantage of developing in Java: you're targetting an abstract VM, not an architecture.
NoozNooz42
@srisar is right. I'm running Windows 7 64 bit with x64 JDK and IntelliJ IDEA. Works great.
Andrew
+1  A: 

For the most part 32 bit apps will run fine on 64 bit windows (32 bit drivers are another story).

It is possible that the 32-bit version of Java will run slower than the 64 bit version (possible does not mean it will, just that it could). It is also possible that the 64-bit version will use more memory than the 32 bit version.

Personally I use 64-bit version of things when available.

TofuBeer
Thanks for the information, i will go for x64
srisar
+3  A: 

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).

Jesper