Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Tips, Tricks & Tweaks
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)

 
Page 1 of 2 1 2
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 24-Oct-2007, 14:55
Snakedriver
Guest
 
Posts: n/a
Default

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.
or
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.
So, let's start following the links:
(anywhere you see a "#" means I'm in a terminal as root in the following code)
Code:
jim@am2:~>**which java
/usr/bin/java
Next we go there & follow the links
Code:
jim@am2:~> ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 2007-10-07 11:57 /usr/bin/java -> /etc/alternatives/java
continue
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:~>
continue
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>
Ah Ha, a quick look in /usr/lib64/jvm shows that I have java-1.6.0.u3-sun-1.6.0.u3 (from the update) and jre_1.6.0.u1 is long gone. However, as seen marked above, the sym-links did not get re-written correctly.
***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
now check that it is gone
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 #
it's gone, great > continue

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
Log out & log in
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
And the return should be (in my case):
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
Which is what I wanted. Your's may be different depending on the Java version you have in in /usr/lib64/jvm.

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




  #2 (permalink)  
Old 25-Oct-2007, 00:21
Wrath5000
Guest
 
Posts: n/a
Default

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.
  #3 (permalink)  
Old 25-Oct-2007, 13:57
sekhardeen
Guest
 
Posts: n/a
Default

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
  #4 (permalink)  
Old 25-Oct-2007, 14:43
Wrath5000
Guest
 
Posts: n/a
Default

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
What am I missing in terms of the plug-in for Java?

Edit; After doing some digging around online I found this bug.
  #5 (permalink)  
Old 25-Oct-2007, 18:17
Snakedriver
Guest
 
Posts: n/a
Default

Quote:
I take for granted that you have the 64bits version though
[/b]
Yes I do.

"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:~>
I recommend tracking that link for a while...
  #6 (permalink)  
Old 25-Oct-2007, 19:17
Snakedriver
Guest
 
Posts: n/a
Default

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
  #7 (permalink)  
Old 26-Oct-2007, 00:12
Wrath5000
Guest
 
Posts: n/a
Default

Cool! Thanks Snakedriver. I'm sure this will help a lot of people once they figure out they have a problem with their Java.
  #8 (permalink)  
Old 26-Oct-2007, 08:43
Snakedriver
Guest
 
Posts: n/a
Default

Quote:
Java now works again in Konqueror, but not in Firefox.
[/b]
Mine isn't working either. And I have updated & ran:
Code:
/usr/sbin/update-alternatives --auto javaplugin
I think my sym-links are OK.
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.
  #9 (permalink)  
Old 26-Oct-2007, 09:09
Snakedriver
Guest
 
Posts: n/a
Default

found it @ ftp://ftp.gwdg.de/pub/languages/java/linu...1.4.2/amd64/03/

But looking at the install instructions:
Quote:
Java Plug-In install instructions
=================================

Please remove older plug-in versions before installing the 1.4.2-03
plug-in. E.g. remove ~/.netscape/plugins/javaplugin.so and
~/.netscape/java/.
[/b]
And don't forget the sym-link: " Note: It has to be a symbolic link, copying libjavaplugin_oji.so will NOT work."

I'm gonna wait for a fix for a while...
  #10 (permalink)  
Old 26-Oct-2007, 15:48
Wrath5000
Guest
 
Posts: n/a
Default

Quote:
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.
[/b]
That info was a *HUGE* help for me, Snakedriver, since I have a 32 bit system, I don't need the nspluginwrapper. As soon as I uninstalled it, Java worked perfectly in Firefox again. That's a pisser for everyone in 64-bit land, though.

I should note, however, that this was after I manually fixed the sym links as per your instructions.
 
Page 1 of 2 1 2

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2