PDA

View Full Version : Java broken



serendip82
1st August 2013, 02:09 PM
Hi,

something killed my java. Today I cannot start my Eclipse IDE anymore. It says that it cannot find java anymore. Yesterday, I installed some upgrades, probably this is the reason. However, I cannot fix it.

I have the following packages installed

java
java-1.7.0-openjdk
java-1.8.0-openjdk

java-1.7.0-openjdk-devel
java-1.8.0-openjdk-devel

I cannot find a java binary.... :confused: and when I want to remove the java-1.7.0 stuff, many other applications will be removed. Should java-1.8.0 take over here?

please help

vallimar
1st August 2013, 06:00 PM
There were messing about with the alternatives symlinks so I would check those.
Maybe install galternatives and see if the various java bits are set properly.

Dutchy
1st August 2013, 08:05 PM
To fix it you can either downgrade your open-jdk, install the one from updates testing, execute "alternatives --config java" or mess with the symlinks yourself.

serendip82
2nd August 2013, 10:31 AM
@vallimar Where can I find these symlinks?

@Dutchy What do you mean with "the one from updates testing"?

I don't understand what is going wrong. It was running OK, now it is broken? Why exactly?

---------- Post added at 09:31 AM ---------- Previous post was at 09:30 AM ----------

And, is this typical for Fedora?

serendip82
2nd August 2013, 10:51 AM
OK,

I've got it to work again.

as root, I moved to
/bin and deleted the symbolic link called java. It was black highlighted, I guess this means that the link was dead (The default color scheme of the terminal is awful..).
I searched in /etc/alternatives for java and found the binary
/etc/alternatives/java_sdk_1.8.0/bin/java.

then in /bin


ln -s /etc/alternatives/java_sdk_1.8.0/bin/java java

its working again.


However, i found many more dead links under /bin. Where does this mess come from and is there a straigth way to repair it?


lrwxrwxrwx. 1 root root 27 1. Aug 14:43 tnameserv -> /etc/alternatives/tnameserv
lrwxrwxrwx. 1 root root 28 1. Aug 14:43 servertool -> /etc/alternatives/servertool
lrwxrwxrwx. 1 root root 29 1. Aug 14:43 rmiregistry -> /etc/alternatives/rmiregistry
lrwxrwxrwx. 1 root root 22 1. Aug 14:43 rmid -> /etc/alternatives/rmid
lrwxrwxrwx. 1 root root 25 1. Aug 14:43 pack200 -> /etc/alternatives/pack200
lrwxrwxrwx. 1 root root 22 1. Aug 14:43 orbd -> /etc/alternatives/orbd
lrwxrwxrwx. 1 root root 25 1. Aug 14:43 keytool -> /etc/alternatives/keytool
lrwxrwxrwx. 1 root root 27 1. Aug 14:43 unpack200 -> /etc/alternatives/unpack200
lrwxrwxrwx. 1 root root 22 1. Aug 14:43 jcmd -> /etc/alternatives/jcmd
lrwxrwxrwx. 1 root root 23 1. Aug 14:43 javap -> /etc/alternatives/javap
lrwxrwxrwx. 1 root root 23 1. Aug 14:43 javah -> /etc/alternatives/javah
lrwxrwxrwx. 1 root root 25 1. Aug 14:43 javadoc -> /etc/alternatives/javadoc
lrwxrwxrwx. 1 root root 23 1. Aug 14:43 javac -> /etc/alternatives/javac
lrwxrwxrwx. 1 root root 27 1. Aug 14:43 jarsigner -> /etc/alternatives/jarsigner
lrwxrwxrwx. 1 root root 21 1. Aug 14:43 jar -> /etc/alternatives/jar
lrwxrwxrwx. 1 root root 22 1. Aug 14:43 idlj -> /etc/alternatives/idlj
lrwxrwxrwx. 1 root root 26 1. Aug 14:43 extcheck -> /etc/alternatives/extcheck
lrwxrwxrwx. 1 root root 21 1. Aug 14:43 apt -> /etc/alternatives/apt
lrwxrwxrwx. 1 root root 30 1. Aug 14:43 appletviewer -> /etc/alternatives/appletviewer
lrwxrwxrwx. 1 root root 22 1. Aug 14:43 rmic -> /etc/alternatives/rmic
lrwxrwxrwx. 1 root root 28 1. Aug 14:43 policytool -> /etc/alternatives/policytool
lrwxrwxrwx. 1 root root 30 1. Aug 14:43 native2ascii -> /etc/alternatives/native2ascii
lrwxrwxrwx. 1 root root 24 1. Aug 14:43 jstatd -> /etc/alternatives/jstatd
lrwxrwxrwx. 1 root root 23 1. Aug 14:43 jstat -> /etc/alternatives/jstat
lrwxrwxrwx. 1 root root 24 1. Aug 14:43 jstack -> /etc/alternatives/jstack
lrwxrwxrwx. 1 root root 27 1. Aug 14:43 jsadebugd -> /etc/alternatives/jsadebugd
lrwxrwxrwx. 1 root root 28 1. Aug 14:43 jrunscript -> /etc/alternatives/jrunscript
lrwxrwxrwx. 1 root root 21 1. Aug 14:43 jps -> /etc/alternatives/jps
lrwxrwxrwx. 1 root root 22 1. Aug 14:43 jmap -> /etc/alternatives/jmap
lrwxrwxrwx. 1 root root 23 1. Aug 14:43 jinfo -> /etc/alternatives/jinfo
lrwxrwxrwx. 1 root root 22 1. Aug 14:43 jhat -> /etc/alternatives/jhat
lrwxrwxrwx. 1 root root 21 1. Aug 14:43 jdb -> /etc/alternatives/jdb
lrwxrwxrwx. 1 root root 26 1. Aug 14:43 jconsole -> /etc/alternatives/jconsole
lrwxrwxrwx. 1 root root 21 1. Aug 14:43 xjc -> /etc/alternatives/xjc
lrwxrwxrwx. 1 root root 26 1. Aug 14:43 wsimport -> /etc/alternatives/wsimport
lrwxrwxrwx. 1 root root 23 1. Aug 14:43 wsgen -> /etc/alternatives/wsgen
lrwxrwxrwx. 1 root root 27 1. Aug 14:43 serialver -> /etc/alternatives/serialver
lrwxrwxrwx. 1 root root 27 1. Aug 14:43 schemagen -> /etc/alternatives/schemagen

vallimar
2nd August 2013, 01:21 PM
As I said.. install galternatives or use 'alternatives' from the command line.

marko
2nd August 2013, 01:24 PM
This is a reasonably good set of java setup instructions

http://www.mjmwired.net/resources/mjm-fedora-f19.html#java

(from the Fedora Set-up Guides link

http://www.fedoraforum.org/?view=fedora_setup

at the top of the forum page)