LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 01-07-2007, 09:44 AM   #1
garbo73
Member
 
Registered: Sep 2003
Posts: 59

Rep: Reputation: 15
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.
 
Old 01-07-2007, 11:05 AM   #2
markelo
Member
 
Registered: Mar 2004
Distribution: Red hat 9 -> 64bit fedora
Posts: 190

Rep: Reputation: 30
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.
 
Old 01-07-2007, 11:09 AM   #3
Lenard
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: Reputation: 56
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)
 
Old 01-07-2007, 12:44 PM   #4
garbo73
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
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.
 
Old 01-07-2007, 03:27 PM   #5
Lenard
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: Reputation: 56
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
 
Old 01-07-2007, 04:08 PM   #6
garbo73
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
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
 
Old 01-07-2007, 04:12 PM   #7
garbo73
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
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.
 
Old 01-07-2007, 05:37 PM   #8
Lenard
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: Reputation: 56
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.
 
Old 01-08-2007, 12:41 AM   #9
markelo
Member
 
Registered: Mar 2004
Distribution: Red hat 9 -> 64bit fedora
Posts: 190

Rep: Reputation: 30
For GNOME I think this will work. Open System menu, Choose preferences and from there chose more preferences. Then preferred applications.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco site java script error with ubuntu/FC6 - but works with freespire (???) bgryderclock Linux - Desktop 0 12-17-2006 11:01 PM
XEN. Problem with install guest FC6 (i386) on platform FC6 (x86_64) Alex_Saf Fedora 0 12-04-2006 12:15 AM
LXer: Java news met with cautious optimism in free Java community LXer Syndicated Linux News 0 11-14-2006 10:21 PM
FC6 beta3 upgrade to Final FC6 thyraios Fedora 1 09-18-2006 07:55 PM


All times are GMT -5. The time now is 07:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration