LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Does java work with firefox? (https://www.linuxquestions.org/questions/slackware-14/does-java-work-with-firefox-504333/)

M$ISBS 11-23-2006 07:39 PM

Does java work with firefox?
 
Ive got firefox 2, downloaded jre and checked the enable java box in preferences and java still will not work. Anyone know if there are any problems with java working in firefox? If not do you have an tips on getting it to work? I have already followed the instructions on the sun website over and over with no luck. :(

kotnik 11-23-2006 07:50 PM

Type following as address in Firefox: about: plugins (kill space after semicolon, bloody editor is turning into smiley).

M$ISBS 11-23-2006 07:59 PM

Quote:

Originally Posted by kotnik
Type following as address in Firefox: about: plugins (kill space after semicolon, bloody editor is turning into smiley).

ok, I see shockwave and nothing else. I suppose there should be a java plugin somewhere there?
I installed it just like the instructions said to and I did the symbolic link thing also.

Sepero 11-23-2006 09:41 PM

Double check, triple check, your symbolic links. After you get the symbolic links correct, FF must be restarted.

M$ISBS 11-23-2006 10:14 PM

Ive been at it for an hour and it still wont work. I have done the instructions on the sun website like 15 times and made sure I placed the correct version I downloaded in place of what the instructions say. I did the symbolic links, downloaded a different version of java and still wont work. Enabled it in FF, restarted it and nothing.

vtel57 11-23-2006 10:16 PM

Hmmmph! I'm having similar problems with Java in Fedora. :(

Sepero 11-24-2006 12:34 AM

OMG, this is so stupid. I can't believe there are distros out there that can't even friggin automate a Java install yet. sheeesh.

I wish people would just use Ubuntu or Mepis (or PCLOS/Xandros/FreeSpire) and freaking be done with it. (I DO have them in my signature for every newbie to see.)

M$ISBS, post the link to the website you are using to try and install this. We should be able to help you get this thing going.

bhert 11-24-2006 12:55 AM

For anyone that has any problems linking Java to your browser, here are the instructions to get it working:) Worked for me!!
Note: There are 2 different instructions depending on your browser and version.
I Got this off the Java web site



Mozilla 1.4 and later

1. Go to the plugins sub-directory under the Mozilla installation directory
cd <Mozilla installation directory>/plugins
2. In the current directory, create a symbolic link to the JRE ns7/libjavaplugin_oji.so file Type:
ln -s <JRE installation directory>/plugin/i386/ns7/libjavaplugin_oji.so

Example:
* If Mozilla is installed in this directory:
/usr/lib/mozilla-1.4/
* and if the JRE is installed at this directory:
/usr/java/jre1.5.0
* Then type at the terminal to go to the browser plug-in directory:
cd /usr/lib/mozilla-1.4/plugins
* Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
ln -s /usr/java/jre1.5.0/plugin/i386/ns7
/libjavaplugin_oji.so .
3. Start Mozilla browser or restart it if it is already running. Note that if you have other Mozilla components (ie: Messenger, Composer, etc) running, you will need to restart them as well.
4. Go to Edit > Preferences. Under Advanced category > Select Enable Java



Mozilla 1.2, Netscape 6 and later

1. Go to the plugins sub-directory under the Netscape directory
cd <Mozilla1.2>/plugins
2. Create a symbolic link to the ns7-gcc29/libjavaplugin_oji.so file:
ln -s <JRE>/plugin/i386/ns7-gcc29/libjavaplugin_oji.so

Example:
* If Netscape is installed at this directory:
/usr/lib/Mozilla1.2/
* And if the JRE is installed at this directory:
/usr/java/jre1.5.0
* Then type at the terminal to go to the browser plug-in directory:
cd /usr/lib/Mozilla1.2/plugins
* Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
ln -s /usr/java/jre1.5.0/plugin/i386/ns7-gcc29
/libjavaplugin_oji.so .
3. Start Mozilla browser or restart it if it is already running. Note that if you have other Mozilla components (ie: Messenger, Composer, etc) running, you will need to restart them as well.
4. Go to Edit > Preferences. Under Advanced category > Select Enable Java

XavierP 11-24-2006 05:07 AM

Slackware has Java preinstalled. Did you install it when you installed Firefox?

And I have moved this to the Slackware forum.

hitest 11-24-2006 07:45 AM

Java works just fine in Slackware out of the box if it is installed.

kotnik 11-24-2006 06:39 PM

This should get you started:

Code:

$ ls -l /usr/lib/mozilla/plugins/
libjavaplugin_oji.so -> /usr/lib/java/plugin/i386/ns7/libjavaplugin_oji.so*


M$ISBS 11-24-2006 08:11 PM

Thanks but those are the exact instructions I have been trying for an hour.

When I do this: libjavaplugin_oji.so -> /usr/lib/java/plugin/i386/ns7/libjavaplugin_oji.so*
as user I get "permission denied" and as root I get "command not found".

:confused:

dx0r515t 11-24-2006 08:32 PM

Quote:

Originally Posted by M$ISBS
Thanks but those are the exact instructions I have been trying for an hour.

When I do this: libjavaplugin_oji.so -> /usr/lib/java/plugin/i386/ns7/libjavaplugin_oji.so*
as user I get "permission denied" and as root I get "command not found".

:confused:

kotnik means that the output of the command ls -l /usr/lib/mozilla/plugins/ should include this line:
Code:

libjavaplugin_oji.so -> /usr/lib/java/plugin/i386/ns7/libjavaplugin_oji.so*
For example here's my output:
Code:

bash-3.00$ ls -l /usr/lib/mozilla/plugins
total 12
lrwxrwxrwx  1 root root  29 2006-04-21 19:04 gxineplugin.so -> /usr/lib/gxine/gxineplugin.so
lrwxrwxrwx  1 root root  50 2006-04-21 19:01 libjavaplugin_oji.so -> /usr/lib/java/plugin/i386/ns7/libjavaplugin_oji.so
-rwxr-xr-x  1 root root 1092 2005-05-01 18:47 libmozsvgdec.la
-rwxr-xr-x  1 root root 7816 2005-05-01 18:47 libmozsvgdec.so


Spinlock 11-24-2006 08:37 PM

Quote:

Originally Posted by Sepero
OMG, this is so stupid. I can't believe there are distros out there that can't even friggin automate a Java install yet. sheeesh.

I can't believe there are distros out there that install grub on the MBR and totally disregard the fact that there were pre-existing OSes on the hard drive(s).

Sepero 11-24-2006 09:29 PM

Quote:

Originally Posted by Spinlock
I can't believe there are distros out there that install grub on the MBR and totally disregard the fact that there were pre-existing OSes on the hard drive(s).

Lame. Most newbies won't have multiple installs of Linux on the same box anyway. People who are running multiple distros will generally have the skills to adjust their own MBR accordingly.
True, it is a problem, and I'm certain it will be dealt with. I could flame on the deformities your_distro all day if you dared to go down that path. I don't think we really want to do that though.

M$ISBS, dx0r515t is correct, follow his advice.

masonm 11-24-2006 09:54 PM

Oh please. Let's not start that lame distro fanboy garbage. It's really old.

duryodhan 11-24-2006 10:51 PM

Quote:

Originally Posted by Sepero
OMG, this is so stupid. I can't believe there are distros out there that can't even friggin automate a Java install yet. sheeesh.

But Slackware does come preinstalled with JRE. Sheesh! :P

hitest 11-24-2006 11:01 PM

Quote:

Originally Posted by duryodhan
But Slackware does come preinstalled with JRE. Sheesh! :P

I know:-) I mentioned this a few posts back:-)
If you install Java it is all there.

M$ISBS 11-25-2006 12:41 AM

Ive tried all the suggestions and a few of my own ideas with no luck. Would it matter if I switched to another browser like Opera?

duryodhan 11-25-2006 01:15 AM

Go to your Slackware Install media and install JDK packages. It would automatically make sure JRE is installed. Or remove JRE with pkgtool and just reinstall JRE again.(But this doesn't seem to work for you so thats why I said the earlier method).

M$ISBS 11-25-2006 01:40 AM

Is there a way to remove all of java, including the JDK I installed previously and start from scratch?

duryodhan 11-25-2006 03:06 AM

yeah I think pkgtool should be able to do it if you did checkinstall.

masonm 11-25-2006 07:18 AM

As duryodhan suggested, use pkgtool to remove the JRE package, then install it again. Also, before you do, in the /usr/lib directory, check to see what the symlink "firefox" is pointing to. Make sure it's pointing to Firefox 2 and not the older one.

tobyl 11-25-2006 07:55 AM

Quote:

Thanks but those are the exact instructions I have been trying for an hour.

When I do this: libjavaplugin_oji.so -> /usr/lib/java/plugin/i386/ns7/libjavaplugin_oji.so*
as user I get "permission denied" and as root I get "command not found".
You got 'command not found' if you entered the above because there is no command there.
You are creating a soft link or 'symlink' for which you need to use ln -s

If you have the Slack firefox2 package,
cd /usr/lib/firefox-2.0/plugins

or alternatively

cd /yourhome/.mozilla/plugins

then issue the command

ln -s /usr/lib/<JREversion>/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so

where JREversion is your JRE version (!) eg jre1.5.0_09

(or simply ln -s /usr/lib/java/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
if you have a symlink already in /usr/lib pointing to your java version, eg "java -> jre1.5.0_09/")

the ln -s command is easy to understand,
ln -s /PATH/TO/TARGET LINKNAME

so NAME is what the link is called, this obviously needs to be what firefox is expecting, ie libjavaplugin_oji.so
Also you need to be in the directory in which you want the link to reside, unless you specify that in your command as well - see 'man ln'

hope that helps

tobyl

M$ISBS 11-26-2006 06:46 PM

Ive done that 20 times several different ways. Nothing seems to work and I dont know what else to do. I did it once more and the console said

" aplugin_oji.so
ln: creating symbolic link `libjavaplugin_oji.so' to `/usr/lib/jre1.5.0_07/plugin/i386/ns7/libjavaplugin_oji.so': File exists
"

The JDK I installed was 1.6 and then I installed the 1.5 JRE. could this be part of the problem?
I dont know what else to do. :(

M$ISBS 11-26-2006 07:54 PM

Am I supposed to have something related to Java in /usr/java ? It is empty.
According to these, http://www.mozilla.org/support/firefox/faq#q2.2 instructions soemething should be there.

Spinlock 11-26-2006 08:06 PM

No, but there should be something in /usr/lib/java.

What I did, exactly as typed, easily copied and pasted to a command line using SHIFT+INSERT:
Code:

ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins/
This is using the JRE from the Slackware install DVD.

kotnik 11-26-2006 08:07 PM

No, there shouldn't be anything in /usr/java by Slackware's default. You can install Java there, if you really want...

Anyway... Just delete that symlink you have and install jre package from your Slackware installation CDs...

M$ISBS 11-26-2006 08:49 PM

Quote:

Originally Posted by Spinlock
No, but there should be something in /usr/lib/java.

What I did, exactly as typed, easily copied and pasted to a command line using SHIFT+INSERT:
Code:

ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins/
This is using the JRE from the Slackware install DVD.

I just checked and I dont have a /usr/lib/java folder. Shouldnt that have been created when I installed the JDK or JRE? Should I go ahead and make the folder and copy the JRE folder to it?
I dont have any 10.2 CDs to install from.

masonm 11-26-2006 09:56 PM

so download the package from a slack mirror and install it

M$ISBS 11-26-2006 10:32 PM

Quote:

Originally Posted by masonm
so download the package from a slack mirror and install it


I did that. Downloaded ran pkgtool and it acted like it installed but still does not seem like its working. :cry:
But when I do which java I get this..... /usr/lib/java/bin/java

Mr_C 11-26-2006 11:08 PM

Hang in there; you'll get java working.
Do all this as root.

run this command
Code:

ls /var/log/packages | grep jre
it should list some version of java.

If it doesn't ok. If it does please remove it with
Code:

removepkg jre-version-you-got-from-above-command
Download this http://mirror.pacific.net.au/linux/s..._09-i586-1.tgz

Code:

installpkg jre-1_5_0_09-i586-1.tgz
Now run this command
Code:

ldconfig
Now remove a possible bad symlink
Code:

rm /usr/lib/firefox/plugins/libjavaplugin_oji.so
Now as Spinlock said do this
Code:

ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins/
And run ldconfig again for the heck of it.

Restart firefox and see if it works now (about:plugins)

M$ISBS 11-27-2006 11:41 PM

I followed those instructions exactly and things went fine until I did:

ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins/

I got no such file or directory so I changed the /usr/lib/firefox/plugins line to point to where my firefox is installed and it created a libjavaplugin file but it has a lock on the icon. If that is locked than that means I cant use it as a user right?

Mr_C 11-28-2006 02:02 PM

the lock means either you don't have access or its a dead link.
ok type this
Code:

find / | grep libjavaplugin_oji.so
to find out where the devil it is.

M$ISBS 11-28-2006 09:35 PM

After doing " find / | grep libjavaplugin_oji.so " I get.........


/home/redguard/libjavaplugin_oji.so
/home/redguard/.mozilla/plugins/libjavaplugin_oji.so
/home/redguard/.mozilla/plugins/jre1.6.0/plugin/i386/ns7/libjavaplugin_oji.so
/home/redguard/.mozilla/plugins/jre1.6.0/plugin/i386/ns7-gcc29/libjavaplugin_oji .so
/home/redguard/downloads/firefox/plugins/libjavaplugin_oji.so
/home/redguard/downloads/jdk1.6.0/jre/plugin/i386/ns7/libjavaplugin_oji.so
/home/redguard/downloads/jdk1.6.0/jre/plugin/i386/ns7-gcc29/libjavaplugin_oji.so
/home/redguard/.local/share/Trash/info/libjavaplugin_oji.so..trashinfo
/home/redguard/.local/share/Trash/info/libjavaplugin_oji.so.trashinfo
/home/redguard/.local/share/Trash/files/libjavaplugin_oji.so
/home/redguard/.local/share/Trash/files/libjavaplugin_oji.so.
/home/redguard/.local/share/Trash/files/jre1_1.6.0/plugin/i386/ns7/libjavaplugin_oji.so
/home/redguard/.local/share/Trash/files/jre1_1.6.0/plugin/i386/ns7-gcc29/libjavaplugin_oji.so
/home/redguard/.local/share/Trash/files/jre1.6.0/plugin/i386/ns7/libjavaplugin_oji.so
/home/redguard/.local/share/Trash/files/jre1.6.0/plugin/i386/ns7-gcc29/libjavaplugin_oji.so
/home/redguard/.local/share/Trash/files/jdk1.6.0/jre/plugin/i386/ns7/libjavaplugin_oji.so
/home/redguard/.local/share/Trash/files/jdk1.6.0/jre/plugin/i386/ns7-gcc29/libjavaplugin_oji.so
find: WARNING: Hard link count is wrong for /: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.

masonm 11-28-2006 09:43 PM

Just a shot in the dark here but did you run ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins/ as root?

M$ISBS 11-28-2006 09:56 PM

Quote:

Originally Posted by masonm
Just a shot in the dark here but did you run ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins/ as root?

Dozens of times and using many different locations........
/usr/lib/firefox/plugins/
/usr/lib/.mozilla/plugins/
/home/myhome/.mozilla/plugins
ETC....

QUESTION....Would Java not installing have anything to do with KDE being in a custom location or does KDE have nothing to do with it?

masonm 11-28-2006 10:02 PM

Quote:

Originally Posted by M$ISBS
Dozens of times and using many different locations........
/usr/lib/firefox/plugins/
/usr/lib/.mozilla/plugins/
/home/myhome/.mozilla/plugins
ETC....

QUESTION....Would Java not installing have anything to do with KDE being in a custom location or does KDE have nothing to do with it?

No, KDE has nothing to do with it.

I don't know, something is not right here. Double check the "firefox" symlink in the usr/lib directory to make sure where it's really pointing. You did say you installed FF2.0 right? (too lazy to go back to original post). Make sure it points to the new one. You can also edit the command to ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox-2.0/plugins/libjavaplugin_oji.so


By the way, what is the output of /ls /usr/lib/firefox-2.0/plugins ?

Mr_C 11-28-2006 10:47 PM

In my case I installed firefox2 from linuxpackages.net. Their install put it in /usr/lib/firefox. I still have my old /usr/lib/firefox-1.5 folder with nothing in it but my old pluggins symlinks.

So, please do a 'ls /usr/lib/firefox*' and see which dir you are really running firefox from. Additionally do a 'whereis firefox' and then 'ls -l path-given-with-previous-command' to help you.

M$ISBS 11-29-2006 09:27 PM

I dont have a /usr/lib/firefox directory of any kind.
I have firefox in /home/myhome/downloads/firefox
when I do whereis firefox it just shows firefox:

Spinlock 11-30-2006 12:19 AM

One last question, M$ISBS...
Code:

find / | grep firefox
We now know where your java plugin is... we need to find out where it goes.

simcox1 11-30-2006 04:07 AM

You don't seem to have java or firefox installed anywhere outside your home directory. Did you install them as root?

Mr_C 11-30-2006 01:49 PM

Quote:

Originally Posted by M$ISBS
I dont have a /usr/lib/firefox directory of any kind.
I have firefox in /home/myhome/downloads/firefox
when I do whereis firefox it just shows firefox:

ok well you can fix this still.

cp -rf /home/myhome/downloads/firefox /usr/lib/firefox-2.0
ln -s /usr/lib/firefox-2.0 /usr/lib/firefox
ln -s /usr/lib/firefox/firefox /usr/bin/firefox
ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins/libjavaplugin_oji.so

Rerun firefox.

M$ISBS 12-01-2006 01:29 AM

Quote:

Originally Posted by simcox1
You don't seem to have java or firefox installed anywhere outside your home directory. Did you install them as root?

I dont think I installed as root, not sure :scratch:

M$ISBS 12-01-2006 01:38 AM

I tried that Mr_c and still does not work. :eek: Im not sure if its even worth it :p , but I wil l keep messing around with it.
Thanks.


All times are GMT -5. The time now is 12:47 AM.