Bug 1075188

Summary: javaws: line 89: /usr/lib/jvm/jre-openjdk/bin/java: No such file or directory
Product: [Fedora] Fedora Reporter: Edouard Bourguignon <madko>
Component: icedtea-webAssignee: jiri vanek <jvanek>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 20CC: dbhole, jvanek, omajid
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-13 07:18:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Edouard Bourguignon 2014-03-11 16:39:14 UTC
Description of problem:
javaws is broken and can't find java. it seems the path is hardcoded line 89. Alternatives points to java binary, java command line works fine. Just javaws is broken (can't run applet from web browsers).

Version-Release number of selected component (if applicable):
icedtea-web.x86_64 0:1.4.2-0.fc20

How reproducible:
static

Steps to Reproduce:
1. install icedtea-web
2. type: javaws

Actual results:
➜  ~  LANG=C javaws                              
/usr/bin/javaws: line 89: /usr/lib/jvm/jre-openjdk/bin/java: No such file or directory

Expected results:
javaws should fine java

Additional info:
I tried to reinstall icedtea-web. No luck.

➜  ~  LANG=C alternatives --display java
java - status is auto.
 link currently points to /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/java
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/java - priority 170051
 slave jre: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre
 slave jre_exports: /usr/lib/jvm-exports/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64
 slave keytool: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/keytool
 slave orbd: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/orbd
 slave pack200: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/pack200
 slave rmid: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/rmid
 slave rmiregistry: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/rmiregistry
 slave servertool: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/servertool
 slave tnameserv: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/tnameserv
 slave unpack200: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/unpack200
 slave java.1.gz: /usr/share/man/man1/java-java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64.1.gz
 slave keytool.1.gz: /usr/share/man/man1/keytool-java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64.1.gz
 slave orbd.1.gz: /usr/share/man/man1/orbd-java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64.1.gz
 slave pack200.1.gz: /usr/share/man/man1/pack200-java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64.1.gz
 slave rmid.1.gz: /usr/share/man/man1/rmid-java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64.1.gz
 slave rmiregistry.1.gz: /usr/share/man/man1/rmiregistry-java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64.1.gz
 slave servertool.1.gz: /usr/share/man/man1/servertool-java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64.1.gz
 slave tnameserv.1.gz: /usr/share/man/man1/tnameserv-java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64.1.gz
 slave unpack200.1.gz: /usr/share/man/man1/unpack200-java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64.1.gz
Current `best' version is /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/bin/java.



➜  ~  ll /usr/lib/jvm/
total 8
drwxr-xr-x. 3 root root 4096 20 janv. 09:37 java-1.7.0-openjdk-1.7.0.60-2.4.4.0.fc20.x86_64
drwxr-xr-x. 4 root root 4096 11 mars  17:27 java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64
lrwxrwxrwx. 1 root root   21 11 mars  17:27 jre -> /etc/alternatives/jre
lrwxrwxrwx. 1 root root   27 11 mars  17:27 jre-1.7.0 -> /etc/alternatives/jre_1.7.0
lrwxrwxrwx. 1 root root   35 11 mars  17:27 jre-1.7.0-openjdk -> /etc/alternatives/jre_1.7.0_openjdk
lrwxrwxrwx. 1 root root   51 11 mars  17:27 jre-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64 -> java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre
lrwxrwxrwx. 1 root root   29 11 mars  17:27 jre-openjdk -> /etc/alternatives/jre_openjdk

Comment 1 Edouard Bourguignon 2014-03-11 16:41:29 UTC
Moreover, the link /usr/lib/jvm/jre-openjdk doesn't exist. There is also a dead link /usr/lib/jvm/jre-1.7.0-openjdk

Comment 2 Edouard Bourguignon 2014-03-11 16:43:58 UTC
Forgot to mention I have this packages installed : 
java-1.7.0-openjdk-headless-1.7.0.60-2.4.5.1.fc20.x86_64 
java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64.rpm

Comment 3 jiri vanek 2014-03-13 07:18:58 UTC
yes. This is known issue. It is caused by not set alternatives corrctly after update. An old selinux bug may be an cause (it caused setting of alternatives after install to fail) , or you have alternatives in manual mode (the rpevious selinux bug could cause it). Please see the solutions in bugs in https://bugzilla.redhat.com/show_bug.cgi?id=1072295#c1

*** This bug has been marked as a duplicate of bug 1072295 ***

Comment 4 Edouard Bourguignon 2014-03-13 09:21:51 UTC
Here is what I've done to fix that:
 alternatives  --config jre_1.7.0
 alternatives  --config jre_openjdk
 alternatives  --config jre_1.7.0_openjdk
 alternatives  --config java_sdk_1.7.0_openjdk
 alternatives  --config java_sdk_openjdk
 alternatives  --config java_sdk_1.7.0

and then alternatives --remove NAME PATH for each of them. I hope now alternatives will automatically set the right path with next updates. Thanks for pointing the right solution.