• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 428
  • Last Modified:

Migration to Java 64 bit

Please give me the steps to migrate from 32 bit to 64 bit Java.
OS - Linux
6 Solutions
Do you  mean you have some application to migrate?

Otherwise you just de-install your 32-bit java and install 64 bit.

You may not even need to de-install 32-bit; just install 64 bit and point your classpath and sometimes application JAVA_HOME to 64 bit

It should be rather straightforward, I believe.
Applications should alos migrate without much problems; unless you have some very special
bit operations in there.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


If you don't need java developemnt (for writing new java programs), but just runtime environement, you can download JRE from here:
As for_yan says a Java application (JAR file) will generally run just fine in either 32-bit or 64-bit Java.  Install the 64-bit version and run it just as you would the 32-bit.

The only major thing to watch for is that memory use will generally be higher in the 64-bit version.  This is because every reference now uses 64-bits instead of 32-bits and in a real program that can quickly add up.

This may mean that you need to start your application with a larger heap than you used for 32-bit.

If you're planning to migrate an "application" from 32-bit to 64-bit environment you should consider these facts before -

1. 64-bit Apps have Wider datapath: The pipe between RAM and CPU is doubled, which improves the performance of memory-bound applications.

2. 64-bit memory addressing gives virtually unlimited (1 exabyte) heap allocation. However large heaps affect garbage collection.

3. Applications that run with more than 1.5GB of RAM (including free space for garbage collection optimization) should utilize the 64-bit JVM.

4. Applications that run on a 32-bit JVM and do not require more than minimal heap sizes will gain nothing from a 64-bit JVM. Barring memory issues, 64-bit hardware with the same relative clock speed and architecture is not likely to run Java applications faster than their 32-bit cousin.

After this if you do decide to go ahead with the migration, you should follow these simple steps

1. Firstly get the 64-bit JDK binary and install it on your workstation.

2. Its preferable to have a 64-bit App/Web Server installed, as they come pre-configured for use with 64-bit JDKs. For 32-bit App Server you need to do some manual changes to JAVA_HOME and CLASSPATH environment variables accordingly.

3. You would require to rebuild/recompile your app on the new 64-bit JDK

4. And then comes the worst part of regression testing your app, because 64-bit JVM is still isn't completely stable yet and sometimes does behave a bit unpredictable. But then again there are always some workarounds.

Happy 64-bit Computing!
From development perspective please do consider following things as well:
1. Is there any external interface providing data through channels like socket or so, the review the code to ensure that the data types marshalling (serialization) is done appropriatly for compatibility issues.
2. In case you are using any JNI calls, then it will be better if you have those JNI library for 64bit ready, or those will run under compatibility mode with reduced performance.

RazAuthor Commented:
Thank you all for your responses.
I am trying to make my application use 64 bit JVM.
Sure let me try installing the jdk.
RazAuthor Commented:
I have installed the jdk, but not able to change the Java_home variable. Please let me know where I need to change this variable.
I have checked in
but found nothing.
OS is Linux
What shell are you using?  If its bash, try ~/.bash_profile or the various files in /etc/profile.d
If you want to set JAVA_HOME for particular user then you do it
in the .profile in the home directory of the user.
If you want to change it globally, then in the /etc folder.
But you may not need to change JAVA_HOME.
Only some applications are reading it.
If you didn't have it before chances are maybe you don't need it.
You need to make sure that in your PATH you have a bin
folder of your new JDK coming before the bin folder of any other JDK's

After you have path correctly - run
java -version
from your terminal
SO you'll see that you have new version of java running

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now