Trying to get java working in firefox...Help


Forum: Apps
Topic: Trying to get java working in firefox...Help
started by: Phinger

Posted by Phinger on Dec. 07 2005,17:18
Well, I downloaded the 2.0 disk, and did a Hdd install fine. I was using firefox (came with 1.0.3 I believe), and wasnt getting any java functionality, so I installed java per thier instructions here for the self extracting binary: < Java >

Only problem is, I cant get it to configure. The commands are slightly different for "1.4 and later" and "1.2", but I went with 1.2 as its an earlier version.
Used:
cd /usr/local/firefox/plugins
ln -s /usr/java/jre1.5.0_06/plugin/i386/ns7-gcc29/libjavaplugin_oji.so
Now I try opening Firefox, and nothing happens. The cpu usage spikes 100% for a couple of sec's, and then stops. Nothing. Maybe I should have upgraded to the latest firefox first? Help.

Posted by Phinger on Dec. 07 2005,17:36
Update: deleted the file I created to "create a symbolic link to the plugin", and firefix works, but I still have no working Java.
Posted by roberts on Dec. 07 2005,18:35
Good post. I forgot to post about this.
Firefox has been a moving target with all their latest builds.
The plugins are now located in your home directory.
Also, the flash plugin download is now part of the firefox and is pretty much automatic. There is a misssing button that appears.

For Java, the link now need to also be in:
/home/dsl/.mozilla/plugins directory.

I usually use our jre uci extension for java, then move the link to the .mozilla/plugins directory

cd to /home/dsl/.mozilla/plugins
ln -s /opt/jre1_5_0/plugin/i386/ns7/libjavaplgin_oji.so .

Then the backup of your home directory will make this link persist.
So the next time you mount the jre uci Java will work.

Posted by Phinger on Dec. 07 2005,19:14
One problem.........I dont see a /home/dsl/.mozilla anything.
I was looking for it before, but couldnt find it.

Funny thing is.......I see it in Midnight Commander. I've never used Commander before..........can I do this there, instead of in a Bash window?

Posted by roberts on Dec. 07 2005,19:17
I always visit a Flash site first and use the install plugin to fetch install and get that directory. I suppose you could just as well mkdir it.

It is a hidden file/directory. I don't know which tool(s) you use. I use bash.



Posted by Phinger on Dec. 07 2005,20:34
Quote
I always visit a Flash site first and use the install plugin to fetch install and get that directory

I did that for flash, and it worked fine. Java wont do it, you have to manually install(which I already did).
As for this:

cd to /home/dsl/.mozilla/plugins
ln -s /opt/jre1_5_0/plugin/i386/ns7/libjavaplgin_oji.so

I have jre1.5.0_06 in /usr/java (where I installed it). So should it be : ln -s /usr/java/jre1.5.0_06/plugin/i386/ns7/libjavaplugin_oji.so   ?
Edit: maybe not....that didnt work. Neither did this: ln -s /opt/jre1_5_0/plugin/i386/ns7/libjavaplgin_oji.so
Fragging Java.....WORK!

Posted by roberts on Dec. 07 2005,21:51
Looks like you have a regular hard drive install?
What version or whose version of Firefox and Java are you trying to use?

I can tell you that using stock DSL 2.0 or higher, liveCD or frugal and jre1_5_0.uci from the repository, Java plugin works as  previously posted.



Posted by Phinger on Dec. 07 2005,23:00
Yes, a regular Hdd install. The firefox right off the 2.0 cd (1.0.3), and since the Java wasnt working, I got the latest from the java website.
Posted by roberts on Dec. 07 2005,23:59
firefox 1.0.3 ??? Not in 2.0
With a hard drive installed system who knows.

All I can do is from a known state.
This can be achieved quite simply by the following steps.

1. boot dsl-2.0 cd like this

dsl norestore base

This will ensure a pristine known state of the OS no loading of any other files that might cause a problem.

2. Step up network (if required)

3. Start firefox to make sure .mozilla is setup, then close Firefox

3. Using the mydsl GUI on the desktop select jre1_5_0.uci
Using this tool will ensure a valid download of java and it is installed in /opt and plugin in /opt/.firefox_plugins

4. mkdir .mozilla/plugins

5. mv /opt/.firefox_plugins/libjavaplugin_oji.so .mozilla/plugins


Start up Firefox, the jre works no problem.

The only new steps required from past uses is steps 4. and 5.

Posted by Phinger on Dec. 09 2005,00:26
Worked like a charm. :) Thanks. I think the problem may have been dropping DSL on top of a previous Slax install, without starting "fresh". I tweaked the partitions, and formatted......follow your instructions - BAM! (its installed on a Toshiba Tecra lappy - p150/148mb ram/2.1gb Hdd BTW. Runs good too.) Firefox shows as 1.0.6 now.
Now.......if the sound would only work :laugh: ---my next project---

Posted by Phinger on Dec. 28 2005,20:13
Pheh..... :(
Now, because I couldn't get the sound working, I wiped the drive, and started fresh. For some reason java wont work now, and I did it the exact same way I did the last time (and it worked then). :angry:

Posted by lagerratrobe on Dec. 28 2005,22:56
I've got a HD install of DSL 2.0 and just enabled Java for Firefox in it.  I'm running Firefox 1.0.6 (default that came with DSL), and j2re1.4.2 (Sun download page for current version was down).

Here's what I did to get it to work. ">" indicates work done in X-shell terminal window.

- download j2re1.4.2.bin file
> su
> mkdir /usr/java/
> chmod a+w /usr/java/
> mv j2re1.4.2.bin /usr/java/
> ./j2re1.4.2.bin
- hit space till license shows up, type "yes", hit <enter>

Ok, now for the critical part, you need to find the correct libjavaplugin_oji.so file.  There's 2 of them you can choose from.  Easiest way to get the full path is to do:

> find /usr/java/ -name "libjavaplugin_oji.so"
/usr/java/j2re1.4.2/plugin/i386/ns610/libjavaplugin_oji.so
/usr/java/j2re1.4.2/plugin/i386/ns610-gcc32/libjavaplugin_oji.so

You want the path to the file that is in the "ns610-gcc32" directory.  Once you find it, select it with your mouse (double-click on the correct line in your find output) and cd to your home directory.

> cd ~<username>
> cd .mozilla/plugins/
> ln -s /usr/java/j2re1.4.2/plugin/i386/ns610-gcc32/libjavaplugin_oji.so libjavaplugin_oji.so

Start Firefox and make sure that in Edit --> Preferences --> Web Features the "Enable Java" and "Enable Javascript" boxes are checked.  If they're not, check them, close and restart Firefox and then go to < http://www.java.com/en/download/help/testvm.xml > to test that it works.

Hope that works for you.

Posted by Phinger on Dec. 29 2005,19:02
Huh.
I got the latest (jre-1_5_0_06-linux-i586), but when I get to the "run it" part( >./jre-1_5_0_06-linux-i586.bin), I get a "permission denied". I >su first, and >chmod a+w /usr/java...........shouldn't I be able to do what I want?

Update: Whoops, had to:

>chmod +x /usr/java/jre-1_5_0_06-linux-i586.bin

Posted by lagerratrobe on Dec. 29 2005,21:12
Forgot that bit.  So's it work now?
Posted by roberts on Dec. 29 2005,21:54
Those instructions work well for a full hard drive install.
They would not  be the best approach for most environments that DSL works in.
It is very confusing to post such instructions.

It is much simplier to grab the jre1_0_5.uci then add a link
in .mozilla/plugins, no sudo needed

cd .mozilla
ln -s /opt/jre1_5_0/plugin/i386/ns7/libjavaplugin_oji.so .

Works in all environments that DSL supports.



Posted by lagerratrobe on Dec. 30 2005,00:58
Dude, you're a pain, so get bent.  The guy said he had an HD install, but hey, not to worry.  If my instructions, which paraphrase those from Sun are too odious, have no fear.  I'll simply stop posting, which is what you are after anyhow.

Cheers and Salut

Posted by Phinger on Dec. 30 2005,01:00
Quote
Forgot that bit.  So's it work now?

No, it didn't completely. I think I had something wrong in the plugin link(fragging caps/syntax just HAS to be exact). Nothing a wipe/re-install didn't fix. Started over, and got it going again. Thanks all for the help.

Posted by Phinger on Dec. 30 2005,01:05
Quote
Dude, you're a pain, so get bent.  The guy said he had an HD install, but hey, not to worry.  If my instructions, which paraphrase those from Sun are too odious, have no fear.  I'll simply stop posting, which is what you are after anyhow.

Whoa, slow down guys.......help is help, no matter what the direction. I think Roberts is hung on the cd and frugal installs, with the HDD people trailing after. No matter. Its going, and with the latest java (not that it probably matters much functionally-wise). :;):
Thanks again.

Posted by roberts on Dec. 30 2005,01:13
Personal attacks have no place on this board, so I will not respond except to say..

I prefer to see a solution that works in all environments that DSL supports.

I will respond to post from anyone that posts only for hard drive install.  Supporting the entire community and not a just a portion should always be a goal.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.