I use Eclipse and 64-bit Windows and develop Java desktop applications. So far, I have only used the 32-bit JDK, but is there any reason to change to 64-bit JDK for Java development?
-
Have you done any research into this before asking us for opinions? what was the results of your research? – t0mm13b Sep 08 '10 at 16:18
-
2I've found this thread useful: http://stackoverflow.com/questions/783662/java-32-bit-vs-64-bit-compatibility – Josh OD Brown Sep 08 '10 at 19:28
3 Answers
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?

- 265,237
- 58
- 395
- 493
-
2
-
-
1This answer is now exactly 6 years old and still the first hit on google. Erickson, would you mind updating your answer? (Even if it is just to say that what you said still holds in 2016! Although I somehow doubt it.) – asachet Sep 09 '16 at 09:31
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).

- 1,421,763
- 867
- 9,128
- 9,194
-
1Late to the party, but for anyone else who stumbles upon this thread: 32-bit OS has max of 4GB, correct, but with PAE installed that is bumped up to 32GB total and max 3GB per process limit -- more than enough in a servlet environment, for example. 2011 and still cannot see a common use case for a 64-bit server OS outside of enterprise; little if any performance benefit, and higher memory consumption, no thanks... – virtualeyes Mar 16 '11 at 04:32
-
Sorry ... I know this is old but ... did you say 2011 and still cannot see a common use case for a 64-bit OS outside of enterprise? Most of the time my laptop which has 16gb of memory, 64bit win 7 is using 7-10gb of memory. I have multiple development environments open a lot of times (Eclipse, Visual Studio 2010/2012), browsers, image editors, etc. I hate having to go back to my 32 bit work computer because I can only run a few programs without starting to page fault. – Jack Jul 10 '12 at 14:35
-
1Also, if you're talking about x86/x86-64 it's not so clear cut. Since the x86-64 arch has more registers, etc, so you can also get some performance benefit using 64-bit that can offset the bigger memory requirements, etc. If you're running on something like SPARC, then you don't need 64bits unless you need the memory space. – Mike Jul 10 '12 at 23:37
-
@jack even with a 64-bit Windows, you can still run a 32-bit JVM. Do not confuse the two. – Thorbjørn Ravn Andersen Jun 23 '13 at 21:57
-
@ThorbjørnRavnAndersen - Hrm I'm not sure what you mean - I run 64-bit Windows with 32bit JVM all the time. – Jack Jun 24 '13 at 04:12
-
Try this:
public class Benchmark {
public static void main(String args[]) {
long time = System.currentTimeMillis();
for (int a = 1; a < 900000000; a++) {
for (int b = 1; b < 20; b++) {
}
}
long time2 = System.currentTimeMillis() - time;
System.out.println("\nTime counter stopped: " + time2);
}
}
In 32 and 64 bit and laugh at the difference.

- 5,131
- 9
- 27
- 36
-
What's going on here? This is very intreguing. I tested this with the 32 and 64 bit versions of JDK 8. I figure the 64-bit edition is able to better determine what constitutes useless work, because it appears to not be doing the loop at all. – Mirrana Apr 30 '14 at 12:04
-
5