Fedora This forum is for the discussion of the Fedora Project. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-07-2007, 10:44 AM
|
#1
|
Member
Registered: Sep 2003
Posts: 59
Rep:
|
java in FC6
I am having trouble getting java to run in Firefox 2. I can see that java is installed and will run other applications in FC6, but it won't run in my browser. I will give any information you need, but as I am fairly new I'm not really sure what information you will need.
Here is my java -version:
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
Thanks for any help and recommendations.
|
|
|
01-07-2007, 12:05 PM
|
#2
|
Member
Registered: Mar 2004
Distribution: Red hat 9 -> 64bit fedora
Posts: 190
Rep:
|
If you installed 32-bit version then this site will help
Fedora core 6 tips and tricks
For 64 bit version...There isn't 64-bit plugin available for java from SUN. But I still use SUN java and exactly same version as you.
One solution ) but it might cause problems when updating java packages ) is put symbolic link
to libgcjwebplugin.so in /usr/lib64/mozilla/plugin directory.
|
|
|
01-07-2007, 12:09 PM
|
#3
|
Senior Member
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
|
Did you create the symbolic link in the firefox or mozilla plugins directory????
http://plugindoc.mozdev.org/faqs/java.html#Linux
FYI: your jre version of java is a bit old;
$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
|
|
|
01-07-2007, 01:44 PM
|
#4
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
I am running a 32-bit OS and have verified that I am linked to Mozilla. I have downloaded and installed the latest Java as well without being able to select the newest Java to run from, here is what I get:
Quote:
[root@localhost plugins]# echo 2 | sudo /usr/sbin/alternatives --config java
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
* 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
+ 2 /opt/jre1.5/bin/java
3 /opt/jre1.6/bin/java
Enter to keep the current selection[+], or type selection number: [root@localhost plugins]# 3
bash: 3: command not found
|
Let me know what else I can try.
Thanks again.
|
|
|
01-07-2007, 04:27 PM
|
#5
|
Senior Member
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
|
Hmmm............
Did you do a local install of firefox2 or did you install firefox2 from the Fedora Development rpm package;
rpm -qa --qf="%{n}-%{v}-%{r}.%{arch}\n" firefox
firefox-2.0.0.1-2.fc7.i386
I use the /usr/lib/mozilla/plugins location myself for the plugins;
Code:
$ ls -al /usr/lib/mozilla/plugins
total 12616
drwxr-xr-x 2 root root 4096 Dec 29 16:44 .
drwxr-xr-x 3 root root 4096 Dec 22 18:44 ..
-rwxr-xr-x 1 root root 6753912 Oct 18 14:15 libflashplayer.so
lrwxrwxrwx 1 root root 55 Dec 29 16:44 libjavaplugin_oji.so -> /usr/java/jre1.6.0/plugin/i386/ns7/libjavaplugin_oji.so
-rwxr-xr-x 1 root root 264188 Oct 20 10:57 mplayerplug-in-dvx.so
-rwxr-xr-x 1 root root 981 Oct 20 10:57 mplayerplug-in-dvx.xpt
-rwxr-xr-x 1 root root 264412 Oct 20 10:57 mplayerplug-in-qt.so
-rwxr-xr-x 1 root root 981 Oct 20 10:57 mplayerplug-in-qt.xpt
-rwxr-xr-x 1 root root 264444 Oct 20 10:57 mplayerplug-in-rm.so
-rwxr-xr-x 1 root root 981 Oct 20 10:57 mplayerplug-in-rm.xpt
-rwxr-xr-x 1 root root 265720 Oct 20 10:57 mplayerplug-in.so
-rwxr-xr-x 1 root root 264700 Oct 20 10:57 mplayerplug-in-wmp.so
-rwxr-xr-x 1 root root 981 Oct 20 10:57 mplayerplug-in-wmp.xpt
-rwxr-xr-x 1 root root 981 Oct 20 10:57 mplayerplug-in.xpt
-rwxr-xr-x 1 root root 4759307 Dec 10 22:29 nppdf.so
I also used Sun's rpm files for java;
$ rpm -qa --qf="%{n}-%{v}-%{r}.%{arch}\n" jdk jre
jre-1.6.0-fcs.i586
jdk-1.6.0-fcs.x86_64
Then did;
Code:
Reconfiguring the default Java configuration for Red Hat / Fedora
This is done as root or equivalent.
First remove /var/lib/alternatives/java file by typing;
rm /var/lib/alternatives/java
When asked press the 'y' key,
Now to create the new (corrected) alternatives file for java type
the following commands as root (modify for jdk as needed);
/usr/sbin/alternatives --install /usr/bin/java java /usr/lib/jvm/jre-1.4.2-gcj/bin/java 1
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jre1.6.0/bin/java 2
/usr/sbin/alternatives --config java
You should now see for example:
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 2 /usr/java/jre1.6.0/bin/java
Enter to keep the current selection[+], or type selection number:
Type: <choose 1 or 2>
In the example above java is already configured correctly [*+ 2] to
use Sun's Java, no changes are needed, just press the Enter key here.
If you have been following the instructions then you should have
the same results (version numbers may be sightly different).
Now type; /usr/sbin/alternatives --display java
You should see for example;
java - status is manual.
link currently points to /usr/java/j2re1.5.0_09/bin/java
/usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1
/usr/java/jre1.6.0/bin/java - priority 2
Current `best' version is /usr/java/jre1.6.0/bin/java.
Next you might want to create (or edit) /etc/profile.d/java.sh
file, example below;
export JAVA_HOME="/usr/java/jre1.6.0/bin/bin"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME"
When done creating or editing the file type;
source /etc/profile.d/java.sh
Now any user root or other wise should be able to use the command;
which java
and the results should read something like;
/usr/bin/java
Also any user root or other wize should be able to use the command;
java -version
and the results should read something like;
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
HTH
|
|
|
01-07-2007, 05:08 PM
|
#6
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
Lenard your post was great, I just had to change a few locations because of my set up but I now have Java 1.6 installed:
Code:
[root@localhost bin]# java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
However, I still cannot use Java within Firefox 2. It's been a while since I installed it, but I believe I found it through JPackages, using an install process I found on the internet. I will show you how I have it linked to the Mozilla Package:
Code:
/usr/lib/mozilla/plugins/libjavaplugin_oji.so is linked to
/opt/jre1.6/plugin/i386/ns7/libjavaplugin_oji.so
Would be willing to give you any other information if you need it to disect why I can't get Firefox to work with Java, my other plug ins are working without a hitch.
Thanks
|
|
|
01-07-2007, 05:12 PM
|
#7
|
Member
Registered: Sep 2003
Posts: 59
Original Poster
Rep:
|
Actually I just found out that if I click on the icon to open my browser it must not be opening in Firefox 2.0. I went through the list of browsers, opened Firefox 2 and my Java works fine. Guess my next question is how to link my browser button to Firefox 2, I am running in Gnome.
|
|
|
01-07-2007, 06:37 PM
|
#8
|
Senior Member
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
|
Sorry, I do not use Gnome so I'm not sure, but with KDE you can simply edit the menu and change this. I'm pretty sure you can do the same with Gnome. You might want to create a new one instead if this is a local install.
Actually, I wrote the java configuration instructions a couple of years ago (when FC4 came out) and update it every so often.
|
|
|
01-08-2007, 01:41 AM
|
#9
|
Member
Registered: Mar 2004
Distribution: Red hat 9 -> 64bit fedora
Posts: 190
Rep:
|
For GNOME I think this will work. Open System menu, Choose preferences and from there chose more preferences. Then preferred applications.
|
|
|
All times are GMT -5. The time now is 04:37 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|