|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Tips, Tricks & Tweaks Tips and Solutions for SUSE Linux
(Please do not post questions here) |
|
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
1st let's understand the problem.
Everything was working swimmingly & all the apps that depend on Java access were working; but, after an online update that added a series of Java updates, you can no longer start those apps as follows: Code:
jim@am2:~> azureus Cannot find java virtual machine, aborting. Code:
jim@am2:~> openproj %F Java auto-detection... Checking java ****Error Java not found or incorrect version. Please install Sun JRE 1.5+ or set JAVA_HOME environment variable if it's already installed. (anywhere you see a "#" means I'm in a terminal as root in the following code) Code:
jim@am2:~>**which java /usr/bin/java Code:
jim@am2:~> ls -l /usr/bin/java lrwxrwxrwx 1 root root 22 2007-10-07 11:57 /usr/bin/java -> /etc/alternatives/java Code:
jim@am2:~> ls -l /etc/alternatives/java lrwxrwxrwx 1 root root 40 2007-10-17 19:58 /etc/alternatives/java -> /usr/lib64/jvm/jre-1.6.0.u1-sun/bin/java**<--- jim@am2:~> Code:
jim@am2:~> cd /usr/lib64/jvm jim@am2:/usr/lib64/jvm> ls -l total 8 drwxr-xr-x 3 root root 4096 2007-10-22 09:59 java-1.5.0-sun-1.5.0_update13 drwxr-xr-x 3 root root 4096 2007-10-22 09:59 java-1.6.0.u3-sun-1.6.0.u3 lrwxrwxrwx 1 root root** 21 2007-10-07 11:57 jre -> /etc/alternatives/jre lrwxrwxrwx 1 root root** 27 2007-10-07 11:57 jre-1.5.0 -> /etc/alternatives/jre_1.5.0 lrwxrwxrwx 1 root root** 33 2007-10-23 22:01 jre-1.5.0-sun -> java-1.5.0-sun-1.5.0_update13/jre lrwxrwxrwx 1 root root** 30 2007-10-07 16:53 jre-1.6.0.u1 -> /etc/alternatives/jre_1.6.0.u1************<--- lrwxrwxrwx 1 root root** 30 2007-10-17 19:58 jre-1.6.0.u3 -> /etc/alternatives/jre_1.6.0.u3************<--- lrwxrwxrwx 1 root root** 30 2007-10-23 21:59 jre-1.6.0.u3-sun -> java-1.6.0.u3-sun-1.6.0.u3/jre lrwxrwxrwx 1 root root** 25 2007-10-07 11:57 jre-sun -> /etc/alternatives/jre_sun jim@am2:/usr/lib64/jvm> ***You must check for your installed version.*** Let's fix it: Code:
jim@am2:/usr/lib64/jvm> su Password: am2:/usr/lib64/jvm # rm jre-1.6.0.u1 Code:
am2:/usr/lib64/jvm # ls -l total 8 drwxr-xr-x 3 root root 4096 2007-10-22 09:59 java-1.5.0-sun-1.5.0_update13 drwxr-xr-x 3 root root 4096 2007-10-22 09:59 java-1.6.0.u3-sun-1.6.0.u3 lrwxrwxrwx 1 root root** 21 2007-10-07 11:57 jre -> /etc/alternatives/jre lrwxrwxrwx 1 root root** 27 2007-10-07 11:57 jre-1.5.0 -> /etc/alternatives/jre_1.5.0 lrwxrwxrwx 1 root root** 33 2007-10-23 22:01 jre-1.5.0-sun -> java-1.5.0-sun-1.5.0_update13/jre lrwxrwxrwx 1 root root** 30 2007-10-17 19:58 jre-1.6.0.u3 -> /etc/alternatives/jre_1.6.0.u3**************<-------what we want lrwxrwxrwx 1 root root** 30 2007-10-23 21:59 jre-1.6.0.u3-sun -> java-1.6.0.u3-sun-1.6.0.u3/jre lrwxrwxrwx 1 root root** 25 2007-10-07 11:57 jre-sun -> /etc/alternatives/jre_sun -rw-r--r-- 1 root root****0 2007-10-24 13:04 ls am2:/usr/lib64/jvm # Note: there should have been a "update-alternatives rpm" installed @ the initial install, but. check for it. Now let's use update-alternatives & do: Code:
#cd / #update-alternatives --auto java you should have your Java apps working. If not check the linkage once again Code:
im@am2:~>**which java /usr/bin/java im@am2:~> ls -l /usr/bin/java im@am2:~> ls -l /etc/alternatives/java Code:
jim@am2:~> ls -l /etc/alternatives/java lrwxrwxrwx 1 root root 40 2007-10-24 13:50 /etc/alternatives/java -> /usr/lib64/jvm/jre-1.6.0.u3-sun/bin/java Note1: For the x86 users, use /lib vice /lib64 if you have the same problem. Note2: This doesn't take very long; it's the learning curve that takes a while. Have fun...Worked for me... |
|
|||
|
Hey thanks, Snakedriver.
I've been mucking around with my Java for almost 2 hours now, I'll have to try this out a little later--I'm a little burnt out right now. |
|
|||
|
A big Thanks for this...
Very clear step by step to correct this problem.. I take for granted that you have the 64bits version though
|
|
|||
|
Java now works again in Konqueror, but not in Firefox. I removed other versions to get this:
Code:
wrath@aramis:~> ls -l /usr/lib/jvm total 8 drwxr-xr-x 3 root root 4096 2007-10-25 00:13 java-1.5.0-sun-1.5.0_update13 drwxr-xr-x 3 root root 4096 2007-10-22 10:00 java-1.6.0.u3-sun-1.6.0.u3 lrwxrwxrwx 1 root root** 21 2007-10-24 23:02 jre -> /etc/alternatives/jre lrwxrwxrwx 1 root root** 27 2007-10-24 23:45 jre-1.5.0 -> /etc/alternatives/jre_1.5.0 lrwxrwxrwx 1 root root** 33 2007-10-25 00:13 jre-1.5.0-sun -> java-1.5.0-sun-1.5.0_update13/jre lrwxrwxrwx 1 root root** 30 2007-10-24 23:26 jre-1.6.0.u3 -> /etc/alternatives/jre_1.6.0.u3 lrwxrwxrwx 1 root root** 30 2007-10-25 00:15 jre-1.6.0.u3-sun -> java-1.6.0.u3-sun-1.6.0.u3/jre lrwxrwxrwx 1 root root** 25 2007-10-24 23:10 jre-sun -> /etc/alternatives/jre_sun Edit; After doing some digging around online I found this bug. |
|
|||
|
Quote:
"Edit; After doing some digging around online I found this bug." Wish I would have looked there 1st; would have eased the learning curve. Thanks for the link. Looks like it still needs work. "What am I missing in terms of the plug-in for Java?" See comment #36 in the link you posted; it's a different path: "l /etc/alternatives/java /etc/alternatives/javaplugin <---------- lrwxrwxrwx 1 root root 38 17 ott 19:11 /etc/alternatives/java -> /usr/lib/jvm/jre-1.6.0.u1-sun/bin/java lrwxrwxrwx 1 root root 80 17 ott 19:13 /etc/alternatives/javaplugin -> /usr/lib/jvm/java-1.6.0.u1-sun-1.6.0.u1/jre/plugin/i386/ns7/libjavaplugin_oji.so" Her'e the way mine looks: Code:
jim@am2:~> l /etc/alternatives/java /etc/alternatives/javaplugin lrwxrwxrwx 1 root root 40 2007-10-24 13:50 /etc/alternatives/java -> /usr/lib64/jvm/jre-1.6.0.u3-sun/bin/java* lrwxrwxrwx 1 root root 80 2007-10-25 19:06 /etc/alternatives/javaplugin -> /usr/lib/jvm/java-1.6.0.u3-sun-1.6.0.u3/jre/plugin/i386/ns7/libjavaplugin_oji.so* jim@am2:~> |
|
|||
|
And here's what Guru says to do: http://dev-loki.blogspot.com/2007/10/upgra...n-opensuse.html
"To quickly fix them, just copy/paste the following snippet as in a shell as root:" Code:
for f in /etc/alternatives/j*; do
**ff=$(readlink "$f")
**case "$ff" in
*****/jvm*|*/share/man/*) update-alternatives --auto "${f##*/}";;
*****) echo "(skipping $f)";;
**esac
done
|
|
|||
|
Cool! Thanks Snakedriver.
I'm sure this will help a lot of people once they figure out they have a problem with their Java.
|
|
|||
|
Quote:
Code:
/usr/sbin/update-alternatives --auto javaplugin I need to recheck the one in Firefox plugins... There is a series of bug reports working... Best help I have found is @ http://marc.info/?l=opensuse&w=2&r...ox+java&q=b specifically http://marc.info/?l=opensuse&m=119318580012825&w=2 which shows a link to /blackdown/JDK-1.4.2/amd64/03 "I got it at ftp://mirrors.ibiblio.org/pub/mirrors/bla...-1.4.2/amd64/03 nspluginwrapper does not work with the java plugin. Remember, you will need to manually make the symlink from the plugin to /usr/lib64/browser-plugins. -- Joe Morris" That link is busy at the moment as it looks like all Linux distros are broken & trying to get it all at once. This will be fixed; hang on... Got to run; back in the PM. |
|
|||
|
found it @ ftp://ftp.gwdg.de/pub/languages/java/linu...1.4.2/amd64/03/
But looking at the install instructions: Quote:
I'm gonna wait for a fix for a while... |
|
|||
|
Quote:
I should note, however, that this was after I manually fixed the sym links as per your instructions. |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|