[CentOS] java 1.6 and 1.7 on CentOS

John R Pierce pierce at hogranch.com
Tue Aug 19 19:25:42 UTC 2014


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


-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast




More information about the CentOS mailing list