Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have my project which requires to run with Java - 64-bit for the main application. And for some other libraries it requires Java - 32-bit version.

On 64-bit Ubuntu 12.04 when i install java it installs only the follow

sun@sun-M14xR2:~/Videos$ java -version java version "1.7.0_21" OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-0ubuntu0.12.10.1) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

Now how i can keep this as it is + separately also install the java - 32 bit?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

Your java deployment is found out by the other application and host OS via the environment variables. Having two deployments of java would work, provided you change the environment variable to point to the required version of java.

Running both of them simultaneously is not possible AFAIK.

share|improve this answer
add comment

The correct way to install more that one Java edition on the same machine is to use the Ubuntu alternatives system. Have a look at how this blog makes use of alternatives.

http://hendrelouw73.wordpress.com/2013/04/16/how-to-install-oracle-java-7-update-21-on-ubuntu-12-10-linux/

Here is a link to the update-alternatives command man page:

http://manpages.ubuntu.com/manpages/lucid/man8/update-alternatives.8.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.