How can I select which Java to use?
Posted
by
user6611
on Ask Ubuntu
See other posts from Ask Ubuntu
or by user6611
Published on 2012-09-05T13:24:20Z
Indexed on
2012/09/05
15:51 UTC
Read the original article
Hit count: 232
I have installed both OpenJDK 6 and 7. When I run "java somefile" from the command line, OpenJDK 6 is invoked. I do not want to change this default behavior. What command can I use to run my non-default OpenJDK 7 installation instead?
(I am used to running "python somefile" to invoke the default Python, "python2.7 somefile" to use Python 2.7 specifically and "python3 somefile" to use Python 3 specifically.)
© Ask Ubuntu or respective owner