tags:

views:

249

answers:

3

I use Eclipse and 64-bit Windows and develop Java desktop applications. Sofar I have only used the 32-bit JDK, is there any reason to change to 64-bit JDK for Java development?

+4  A: 

The primary reason would be if you wanted to write an app capable of using a large amount of memory (e.g. over 4GB, or whatever the per-process limit on your operating system is).

Jon Skeet
A: 

You may get some very small performance benefit when compiling with 64bit jdk. Why not try building your app in both and see. I believe that the bytecode generated with 32bit jdk will work on 64bit jre so the app you build can run on large memory if your target machine has it - evenif you build it with 32bit jdk.

Personally I would try to use the exact version that the app will be used on. This would normally be the latest version but sometimes for web apps the container may be validated against only specific versions or a company may have a specific reason why they deploy a specific version of java to their server/pc.

Adam Butler
I strongly doubt that javac produces different bytecode for 32-bit and for 64-bit. This would mean the end of "compile-once, run everywhere"
gawi
+5  A: 

No, for your development-time activities, 32 bits is likely to be enough.

The newest JVMs support pointer compression, but otherwise, the 64-bit version of an application requires more memory to run. Only use 64-bits if your application needs to address more memory (32 bits should address 4 Gb, but OS considerations sometimes make this less).

Besides wasting a bit of memory, a 64-bit version shouldn't be a problem, but anecdotally, all of the inexplicable crashes of the usually rock-solid JVM I hear complaints about are in 64-bit versions. It could be the OS or other factors, but if you don't have a reason for 64 bits, why push your luck?

erickson