FedoraThis 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.
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.
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)
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:
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)
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.