Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.

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

share|improve this answer

Your Answer


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.