• 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
0
Raz
Asked:
Raz
6 Solutions
 
for_yanCommented:
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.
0
 
for_yanCommented:
Applications should alos migrate without much problems; unless you have some very special
bit operations in there.
0
 
for_yanCommented:
0
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!

 
for_yanCommented:

If you don't need java developemnt (for writing new java programs), but just runtime environement, you can download JRE from here:
http://www.oracle.com/technetwork/java/javase/downloads/jre-6u29-download-513650.html
0
 
dpearsonCommented:
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.

Doug
0
 
dhruvpratapCommented:
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!
0
 
Rahul_GadeCommented:
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.

-Rahul
0
 
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.
0
 
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
/users/user/.profile
/etc/profile
but found nothing.
OS is Linux
0
 
gordon_vt02Commented:
What shell are you using?  If its bash, try ~/.bash_profile or the various files in /etc/profile.d
0
 
for_yanCommented:
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
0

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