Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why should I use the 64-bit JDK over the 32-bit version?

Tags:

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?

like image 696
Jonas Avatar asked Sep 08 '10 16:09

Jonas


People also ask

Should I use 32bit or 64bit Java?

Java with 64 and/or 32 bit web browsersUsers that run Applets and Web Start applications through web browsers should choose the version of Java that matches their web browser. Generally speaking, 64 bit browsers run only 64 bit plugins and 32 bit browsers run only 32 bit plugins.

What is difference between JDK 32 and 64-bit?

32-bits and 64-bits JVMs use different native data type sizes and memory-address spaces. 64-bits JVMs can allocate (can use) more memory than the 32-bits ones. 64-bits use native datatypes with more capacity but occupy more space. Because that, the same Object may occupy more space too.

Is it better to use 32-bit or 64-bit?

Simply put, a 64-bit processor is more capable than a 32-bit processor because it can handle more data at once. A 64-bit processor can store more computational values, including memory addresses, which means it can access over 4 billion times the physical memory of a 32-bit processor. That's just as big as it sounds.

Is 64-bit Java better?

64 bit Java will often perform better on things with heavy computation loads. Java programs, classically, have heavy I/O loads and heavy network loads; 64 bit vs 32 bit may not matter, but operating systems usually do.


1 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?

like image 189
erickson Avatar answered Sep 30 '22 19:09

erickson