Fedora Linux Support Community & Resources Center
  #1  
Old 26th February 2010, 10:29 PM
gilli.livi Offline
Registered User
 
Join Date: Oct 2008
Posts: 8
linuxfedorafirefox
java not working

hi,

I have Fedora 12 and Windows 7 in a dual boot configuration in my lenovo laptop.
The config of my laptop is core2duo 1.73, 3gb ram and 160gb hdd.

My java was working properly till now. I used to start JDownloader by using "java -jar JDowloader.jar". But now it is showing "command not found"

Code:
[root@electron ~]# java -jar /root/.jd/JDownloader.jar 
bash: java: command not found

[root@electron ~]# which java
/usr/bin/which: no java in (/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/sbin:/usr/sbin:/sbin:/opt/real/RealPlayer:/home/livingstone/bin:/opt/real/RealPlayer:/opt/real/RealPlayer)

[root@electron ~]# echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/sbin:/usr/sbin:/sbin:/opt/real/RealPlayer:/home/livingstone/bin:/opt/real/RealPlayer:/opt/real/RealPlayer

[root@electron ~]# ls /usr/bin/java -l
lrwxrwxrwx 1 root root 22 2010-02-27 02:09 /usr/bin/java -> /etc/alternatives/java
The output of the "ls /usr/bin/java -l" had "/usr/bin/java" in red and "/etc/alternatives/java" in blinking red

I tried reinstalling java using the following command

Code:
yum reinstall java -y
But the problem persists. Any idea what the problem could be? Should I add anything more to the $PATH variable?
Reply With Quote
  #2  
Old 26th February 2010, 10:34 PM
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,305
linuxopera
Quote:
The output of the "ls /usr/bin/java -l" had "/usr/bin/java" in red and "/etc/alternatives/java" in blinking red
Indicates a busted sym-link. Fix it.

V
Reply With Quote
  #3  
Old 26th February 2010, 11:28 PM
gilli.livi Offline
Registered User
 
Join Date: Oct 2008
Posts: 8
linuxfedorafirefox
I dont know how to fix the symlink because after few redirections the destination file is not found. I have shown it below. The path in the right side of the "->" was blinking in red

Code:
[root@electron ~]# ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 2010-02-27 02:09 /usr/bin/java -> /etc/alternatives/java
[root@electron ~]# ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 26 2010-02-27 02:09 /etc/alternatives/java -> /usr/java/default/bin/java
[root@electron ~]# ls /usr/java/default/bin/java
ls: cannot access /usr/java/default/bin/java: No such file or directory
What should I do now?
Reply With Quote
  #4  
Old 27th February 2010, 01:21 AM
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 7,408
linuxfedorafirefox
Assuming you are using the Fedora 12 provided openjdk java, to reinstall:
Code:
yum reinstall java-1.6.0-openjdk
Reply With Quote
  #5  
Old 27th February 2010, 05:19 AM
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,305
linuxopera
It appears that you had Sun Java installed at one time, and that the alternatives configurator was set to point to it, but now it's missing. Fix the alternatives config (assuming F12 as Paul says) by running (as root-user) the Alternatives Configurator.

V
Reply With Quote
  #6  
Old 27th February 2010, 07:52 AM
gilli.livi Offline
Registered User
 
Join Date: Oct 2008
Posts: 8
linuxfedorafirefox
Thank you Pablo Two. I already tried "yum reinstall java". The package java-1.6.0-openjdk was reinstalled when I tried the previous command. But the problem persisted.

Thank you Hlinger. I ran galternatives(GUI frontend for alternatives) and there were multiple entries for java. I changed the one currently selected one for java from "/usr/java/default/bin/java" to "/usr/lib/jvm/jre-1.6.0-openjdk/bin/java". Now java is working.



Thank you guys for the help. Fedora Forum rocks.
Attached Thumbnails
Click image for larger version

Name:	chrome1.png
Views:	2152
Size:	56.4 KB
ID:	19126  
Reply With Quote
  #7  
Old 15th April 2010, 10:24 PM
mmachado Offline
Registered User
 
Join Date: Dec 2008
Location: Brazil
Posts: 3
linuxfirefox
Re: java not working

gilli,

could you help me providing me more info about how to use this aplication? Nothing I do solve my problem.

thanks,
Mateus


Quote:
Originally Posted by gilli.livi View Post
Thank you Pablo Two. I already tried "yum reinstall java". The package java-1.6.0-openjdk was reinstalled when I tried the previous command. But the problem persisted.

Thank you Hlinger. I ran galternatives(GUI frontend for alternatives) and there were multiple entries for java. I changed the one currently selected one for java from "/usr/java/default/bin/java" to "/usr/lib/jvm/jre-1.6.0-openjdk/bin/java". Now java is working.



Thank you guys for the help. Fedora Forum rocks.

Last edited by mmachado; 15th April 2010 at 10:28 PM.
Reply With Quote
  #8  
Old 27th April 2010, 02:30 PM
gilli.livi Offline
Registered User
 
Join Date: Oct 2008
Posts: 8
linuxfedorafirefox
Re: java not working

mateus,

do you have the same problem, i.e, the java binary is not found.
If so, did u try changing the options in galternatives? If that is not working, post the "ls -l <galternatives entry for java>" output for all the entries for java in galternatives.

Also this problem got solved, i.e., the links were set straight when i updated fedora
Reply With Quote
  #9  
Old 27th April 2010, 04:17 PM
mmachado Offline
Registered User
 
Join Date: Dec 2008
Location: Brazil
Posts: 3
linuxfirefox
Re: java not working

hi gilli.livi,

I finnally found the solution out! I was going to reply this!
Well, It was very simple, although I could not see this before. I read many helps and nothing worked. I updated/reinstalled Java but It seems the solution was ONLY create a symbolic link in /usr/lib/mozilla/plugins/javaplugin_oji.so from the file in /usr/java/jreYOUR_VERSION/lib/i386/libnpjp2.so:

Creating the symbolic link:

Code:
sudo ln -s /usr/java/jre1.6.0_20/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/javaplugin_oji.so

This simply solved my problem and It will do for every user. I trying do this in another paths like:
/usr/lib/firefox/plugins
/usr/lib/firefox-3.6/plugins
/home/USER/.mozilla/plugins
/home/USER/.mozilla/firefox/PROFILE/


But they didn't work.

My system operation is Fedora 10, 32bits.


anyway thank you very much!!!!,
Mateus
Reply With Quote
  #10  
Old 27th April 2010, 04:59 PM
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,305
linuxopera
Re: java not working

You apparently used the Sun Java self-extracting RPM. In which case the link should be:
sudo ln -s /usr/java/default/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/javaplugin_oji.so

That way, if/when you update Java, the link won't break. /usr/java/default/ is itself an auto-generated link to the latest Java folder in /usr/java/ , created by a %postinstall script in the Java RPMs, exactly for this purpose.

V

P.S. Also: you guys missed the 'libjavaplugin.so' alternative item in the Alternatives Configurator (separate item from Java).
Attached Thumbnails
Click image for larger version

Name:	alternatives1.png
Views:	105
Size:	51.8 KB
ID:	19435  
Reply With Quote
  #11  
Old 27th April 2010, 05:58 PM
mmachado Offline
Registered User
 
Join Date: Dec 2008
Location: Brazil
Posts: 3
linuxfirefox
Re: java not working

Yeah, I didn't realized this. Better and definitive solution, yours.

thank you,
Mateus


Quote:
Originally Posted by Hlingler View Post
You apparently used the Sun Java self-extracting RPM. In which case the link should be:
sudo ln -s /usr/java/default/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/javaplugin_oji.so

That way, if/when you update Java, the link won't break. /usr/java/default/ is itself an auto-generated link to the latest Java folder in /usr/java/ , created by a %postinstall script in the Java RPMs, exactly for this purpose.

V
Reply With Quote
Reply

Tags
firefox, java, path error, plugin

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sun's Java not working/32-bit firefox not working Elektrey Using Fedora 0 1st August 2008 08:16 PM
Fedora 5 - amsn not working, flash not working, java not working =*> try this snecci Using Fedora 6 27th April 2006 11:38 AM
Fedora 5 - amsn not working, flash not working, java not working =*> try this snecci Using Fedora 0 5th April 2006 06:50 AM
java plugin not working in firefox but working with konqueror FireMac Using Fedora 7 12th March 2006 07:35 AM
Java not working Thoreau Using Fedora 16 3rd April 2004 08:46 AM


Current GMT-time: 11:11 (Sunday, 26-03-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat