Re: java 1.6 and 1.7 on CentOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 2014-08-19, John R Pierce <pierce@xxxxxxxxxxxx> wrote:
> On 8/19/2014 12:08 PM, Les Mikesell wrote:
>> Yes, I think pretty much everything in recent Linux distributions is
>> aimed at making it more single-user and PC-like instead of a unix
>> server.  Following Apple's lead, I guess. But even a single user may
>> need to run applications with differing requirements. Fortunately you
>> can still set JAVA_HOME and give a full path to either executable -
>> you just have to follow the weird symlinks or list the paths from the
>> rpm to figure out where they really put things.
>
> setting JAVA_HOME generally isn't required for running java at the 
> shell, just putting the right java bin directory first in the path is 
> sufficient...
>
> when you invoke java, it sets JAVA_HOME itself if its not already set.
>
> and, WOW, what a tangled web of symlinks.
>
> export 
> JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el7_0.x86_64/jre
> export PATH=$JAVA_HOME/bin:$PATH
>
> is the REAL java directory...  but that will change with a minor 
> update.   yuck!!!

Just set JAVA_HOME to /usr/lib/jvm/jre-1.7.0-openjdk, or to
/usr/lib/jvm/jre-1.7.0 if you don't care about the implementation. Those
will survive updates.

-- 

Liam


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux