Strange issue installing Java 8

Tags
aix

 
Thread Tools Search this Thread
# 1  
Old 07-12-2018
Strange issue installing Java 8

I just intalled java8_64.jre and .sdk respectively

Code:
installp -agXYd . Java8_64.jre Java8_64.sdk 2>&1 | tee installp.log

Worked like a champ. Now I see this--

Code:
jeff@server:/usr> ls -l | grep java
drwxr-xr-x    9 bin      bin             512 Sep 22 2010  java14
drwxr-xr-x    7 bin      bin             512 Oct 13 2015  java5
drwxr-xr-x    8 bin      bin             512 Oct 13 2015  java6
drwxr-xr-x    7 bin      bin             512 Sep 18 2014  java6_64
drwxr-xr-x    3 bin      bin             512 Feb 09 2015  java8_64

I added the path to the profile and resourced/logged out..

Code:
PATH=/usr/sbin:/usr/localcw/sbin:$PATH:/sbin:/opt/IBM/db2/V9.7/bin:/usr/lib/java8/jre/bin:/usr/java8_64/jre/bin

Code:
export PATH

Everything is how i have done it a million times. Heres the fun part...

Code:
jeff@server:/home1/jeff> java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build ca142-20090307 (SR13) (JIT enabled: jitc))
jeff@server:/home1/jeff> whereis java
java: /usr/lib/java
jeff@server:/home1/jeff> whence java
/usr/java14/jre/bin/java
jeff@server:/home1/jeff>

Anyone have some tips that can help the profile, whereis, whence, which (its the same was whence) all equal java 8. I need to do this for root as well.. thanks in advance
# 2  
Old 07-12-2018
What is the output of which java?
# 3  
Old 07-12-2018
Same as whence

Sorry. I donít think I can do tags on mobile
# 4  
Old 07-12-2018
Quote:
Code:
PATH=/usr/sbin:/usr/localcw/sbin:$PATH:/sbin:/opt/IBM/db2/V9.7/bin:/usr/lib/java8/jre/bin:/usr/java8_64/jre/bin

Appends the new java path to the existing PATH.
What is the resulting PATH
Code:
echo $PATH

?
# 5  
Old 07-12-2018
I don't say you are doing it wrong... But somehow you do... Java should be in your path and that should be a link to the version you are using! Also maybe it is wrong on my site and you are doing it... You decide Smilie
For me java is in /usr/bin and that is a link to /usr/bin/java -> /some very long path/java
# 6  
Old 07-12-2018
I'm with MadeInGermany and DukeNuke2 who are both on track but let me explain this the way I see it.

Normally apps look for Java at either /usr/java or /usr/lib/java (depending on exactly which O/S it is).

However, an installation of jre will install to something like /usr/jrel.8.n or whatever.

The key is that the install directory (e.g. /usr/jrel.8.1) needs to be linked to the apps expected location (e.g. /usr/java) like:

Code:
# cd /usr
# ln -s jrel.8.1 /usr/java

then java apps and java version query commands can find the installed jre.

If you had previous versions of jre installed and that directory is still linked to /usr/java (or /usr/lib/java) then your apps will see the old version.

You will need to research what directory your apps expect java to be in and what directory your jre 8 is in, and link them.
# 7  
Old 07-13-2018
Code:
jeff@server:/home1/jeff> echo $PATH
/usr/sbin:/usr/localcw/sbin:/usr/sbin:/usr/localcw/sbin:/usr/local/bin:/usr/local/sbin:/usr/java14/jre/bin:/usr/java14/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/lpp/pd/bin:/usr/lpp/psf/bin:/usr/lpp/ars/bin:/usr/lpp/Acrobat3/bin:/app/ondemand/bin:/sybase/OCS-12_5/bin:/usr/vac/bin:/usr/vacpp/bin:/home1/jeff/bin:/bin:.:/sbin:/opt/IBM/db2/V9.7/bin:/usr/lib/java8/jre/bin:/usr/lpp/ars/bin:/sbin:/opt/IBM/db2/V9.7/bin:/usr/lib/java8/jre/bin:/usr/java8_64/jre/bin

jeff@server:/home1/t15krtk> java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build ca142-20090307 (SR13) (JIT enabled: jitc))
jeff@server:/home1/jeff>

Code:
# cd /usr
# ln -s jrel.8.1 /usr/java

Ran with sudo np

---------- Post updated 07-13-18 at 06:33 AM ---------- Previous update was 07-12-18 at 06:12 PM ----------

Any more thoughts

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Strange Issue with sendmail mohtashims Shell Programming and Scripting 3 08-31-2016 11:13 PM
Strange Keyboard and Mouse Issue mrm5102 UNIX for Dummies Questions & Answers 12 02-10-2015 05:50 PM
Installing Java Problems Fob Upset UNIX for Dummies Questions & Answers 2 03-11-2011 06:47 PM
help with installing java EE on fedora 14 ShinTec Red Hat 1 02-15-2011 10:58 AM
strange route issue in powerha 5.4? rs6000er AIX 1 06-24-2009 02:23 PM
Strange Mysql issue muay_tb Web Programming 1 04-27-2009 08:05 AM
strange issue with ALOM in t51... upengan78 Solaris 13 02-23-2009 11:42 AM
strange aunthentication issue with email mcraul UNIX for Advanced & Expert Users 0 07-15-2008 12:32 PM
Strange issue AndrewSH UNIX for Dummies Questions & Answers 1 01-29-2008 05:33 PM
installing java 5.0 in HPUX B11.11 winky HP-UX 6 01-22-2008 11:21 PM
Java Exceptions while installing Oracle panchpan Solaris 5 11-21-2007 04:46 AM
Installing Java on Openserver 6 LetSco UNIX for Dummies Questions & Answers 6 07-04-2007 02:01 PM
root Password ... strange issue badrali Security 6 06-28-2007 10:41 AM
Strange Number comparison issue shihabvk UNIX for Advanced & Expert Users 9 04-10-2007 01:19 AM