2

I am on a RHEL 5.5 64 bit box. The systems engineer installed the 64-bit Java VM under /usr/bin ; however, I needed a 32 bit VM which he installed in /opt/jdk1.6.0_35. But now, everytime I do java -version it shows that I'm using the 64-bit VM.

How do I force it to select the 32 bit VM? I changed the PATH to not include /usr/bin, but that's where most of the important programs like vi and nano are, and I cannot exclude that.

Is there another variable I can add to force it to select the 32 bit VM by default?

4

You just need to put the location of the new binary in your PATH first. When you try to run java, the shell will search your path for the first instance and run it. Try this:

$ export PATH=/opt/jdk1.6.0_35/bin:$PATH

That's assuming you're using bash, or a similar shell. Now any commands that exist in /usr/bin/ will be overridden by those in the new directory.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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