[CentOS] java 1.6 and 1.7 on CentOS

Toralf Lund toralf.lund at pgs.com
Tue Aug 19 14:24:36 UTC 2014


On 19/08/14 14:48, Chris Pemberton wrote:
> On 08/19/2014 07:00 AM, Carson Chittom wrote:
>> Asma rabe <asma.rabe at gmail.com> writes:
>>
>>> If i should install both java 1.6 and 1.7 , how to do that ?
>> I don't know whether you *should* do it, not knowing much about your
>> setup, but assuming CentOS 7, I think you can install both the
>> java-1.6.0-openjdk and java-1.7.0-openjdk packages.
I haven't tried that on CentOS 7, but it certainly works on CentOS 6. 
Java 1.7 is probably there already, and 1.6 can be installed via

yum install java-1.6.0-openjdk

The trick here is that java 1.7 and java 1.6 are provided by what's 
technically two different packages, as opposed to different versions of 
one package.

alternatives --config java

Let's you select which of the installed java releases will be started by 
the "java" program.

Note that this is not necessarily the same as what's run by the java 
plugin. For that, you may want to di

alternatives --config jre_openjdk


instead.

- T
>>
>>
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org
>> http://lists.centos.org/mailman/listinfo/centos
> If you're interested in Oracle's Java, here are tutorials to install
> versions 7 and 8:
>
> http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-7-on-fedora-centos-red-hat-rhel/
> http://www.if-not-true-then-false.com/2014/install-oracle-java-8-on-fedora-centos-rhel/
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos


This e-mail, including any attachments and response string, may contain proprietary information which is confidential and may be legally privileged. It is for the intended recipient only. If you are not the intended recipient or transmission error has misdirected this e-mail, please notify the author by return e-mail and delete this message and any attachment immediately. If you are not the intended recipient you must not use, disclose, distribute, forward, copy, print or rely on this e-mail in any way except as permitted by the author.



More information about the CentOS mailing list