It's here - Java Plugin for Firefox on 64bit Linux (tested with Ubuntu)
An issue that bothered many users of 64bit Linux is hopefully a history since JavaSE 6u12, which is now available in development version (therefore it is not a stable build and it is not recommended for "production use"). I have managed to install a Java plugin for Firefox on my 64bit Ubuntu - installation was pretty flawless...
Confirmed here: https://jdk6.dev.java.net/6uNea.html
So, what do you need to do in order to have a working Java in your Firefox on 64bit Linux?
- Update: Use Firefox from your distro repository.
- Rollback
all your previous attempts to make Java work - if you don't perform
this step, the result is uncertain... This includes especially
following:
- Make sure you have 64bit version of Firefox (previous workaround was to use 32bit version of browser). Note that there is also a 64bit Flash plugin for Linux available, so 32bit version of browser should not be needed anymore...
- Remove IcedTea/gcj/... plugin if you were using it
- Download JRE 6u12 (an early access) from pages with JavaSE 6u12 dowloads (you can use this link pointing to the b03) and install Java to any desired folder (I would suggest /usr/lib/jvm folder for Ubuntu users, this is where Ubuntu places Java by default)...
- Create a link (ln) pointing to the Java plugin (file <JRE_FOLDER>/lib/amd64/libnpjp2.so) in the ~/.mozilla/plugins folder (to let Firefox know where the new plugin is...) - maybe you will have to create this folder (I had to)
- Make sure the installation didn't interfere with the rest of your Java environment and that you are using stable Java system wide (call java -version). If not, reconfigure your Java environment, for example using update-java-alternatives command (thank's to Petr Chytil for the hint)
Hope this works for you, now you should be able to check some sweet JavaFX demos out...
If you experience any troubles, please share them in discussion below...
Update: Users of RHEL, please read the discussion for troubleshooting...
That's only one post that really help me to make FF working with java.
So thanks a lot :)
-Igor
Posted by Igor on January 20, 2009 at 02:30 AM PST #
Hi, downloaded the jre-6u12-ea-bin-b03-linux-amd64-22_dec_2008.bin, made it executable but it won't run to install. Can't open with an archive manager either. Any clues on how to install it? I'm running 64 bit Ubuntu Intrepid. Need a 64 bit java plugin for my 64 bit FF3 install.
Thanks
Posted by Craig on January 23, 2009 at 04:47 PM PST #
Found the answer to the installation problem. Thought I'd share this great link:-
http://www.64bitjungle.com/tag/jre/
Craig
Posted by Craig on January 23, 2009 at 05:26 PM PST #
Any chance Fedora 10 users can get some love? I saw the RPM was available however it is not working for me. I reversed all my changes as stated. Any chance a howto for Fedora can be published as well?
Posted by JoeTheNuKularPhysist on January 25, 2009 at 03:59 AM PST #
Hi guys, sorry for the late reply, it is an exam period in Prague;). I am happy this post is so visible;)!
First - thanks for the link, Craig, it should make some things clearer (some steps I considered basic for an average linux user are mentioned there, but it is my problem, I should explain myself clearer). Please - anyone - use that link as an additional reference if needed.
Joe: Basically, you can use the "bin" (non-RPM) file in any 64bit distro - it is a binary installer. You need to make the file (I use name "jre_file.bin" and "jre_file", for short) executable after you download it and after you place it to desired directory (which is preferably /opt/ or /usr/lib/jvm). Following commands should do all the job:
# sudo -s
# mkdir /opt/java
# cp ~/Desktop/jre_file.bin /opt/java
# chmod +x /opt/java/jre_file.bin
# /opt/java/jre_file.bin
# rm /opt/java/jre_file.bin
# exit
# mkdir ~/.mozilla/plugins
# cd ~/.mozilla/plugins
# ln -s /opt/java/jre_file/lib/amd64/libnpjp2.so
Note: Alternatively, you can avoid the "chmod" line and use this one for executing installer (it will do the job, but looks kind'a naughty to me...):
# bash /opt/java/jre_file.bin
If you follow the steps above (or from the link Craig posted), you should have no major problem with installation and setting up the right environment... If yes, do not hesitate to contact me on my mail...
Posted by Petr Dvorak on January 26, 2009 at 06:07 AM PST #
I have give it a try on my rhel 5.3 box and it works like a charm.. even my Komerz Bank work well with this plugin... Just one thing.. this obscure directory called amd64 .. what is that I do not thing that even ubuntu has /usr/amd64 directory so why it is not lib64?
cheers guys for lot of us who can give farewell to all those unneeded i386 soft/libs
Vlad
Posted by Vladimir Benes on January 28, 2009 at 04:10 AM PST #
Hi Vladimir,
I am glad you made it working on RedHat, it is nice to hear some "stories of success" from other Linux distros than I use. ;-)
A small note to the "amd64" dir from an Ubuntu user. If you install Java (I mean JDK or JRE) on Ubuntu normally from the official repositories ("sudo apt-get install sun-java6-jdk"), it is automatically placed in the "/usr/lib/jvm/" directory, like this:
joshis@joshis-desktop:/usr/lib/jvm$ ls -l
total 12
lrwxrwxrwx 1 root root 23 2009-01-13 15:08 java-1.5.0-sun -> java-1.5.0-sun-1.5.0.16
drwxr-xr-x 10 root root 4096 2009-01-13 15:08 java-1.5.0-sun-1.5.0.16
lrwxrwxrwx 1 root root 19 2008-12-18 02:30 java-6-sun -> java-6-sun-1.6.0.10
drwxr-xr-x 9 root root 4096 2009-01-07 03:03 java-6-sun-1.6.0.10
drwxr-xr-x 8 root root 4096 2009-01-05 15:48 jre1.6.0_12
The last line of output doesn't count, it is the one that I am writing about at this post;-), it is not from repos.
Everything is placed in one place under these folders and therefore the subfolder "amd64" is in corresponding JRE folder (for example "/usr/lib/jvm/java-6-sun/jre/lib/amd64/")...
IMO not a big deal and it could make some things little more clean and easier to maintain ("you keep all the Java and the stuff around Java in one place").
With regards,
Petr Dvorak
Posted by Petr Dvorak on January 28, 2009 at 03:20 PM PST #
I have tried the above on openSUSE 10.2 I get the following error message when loading firefox on the command line.
LoadPlugin: failed to initialize shared library /opt/java/jre1.6.0_12/lib/amd64/libnpjp2.so [/opt/java/jre1.6.0_12/lib/amd64/libnpjp2.so: wrong ELF class: ELFCLASS64]
Posted by Werner Stucky on January 31, 2009 at 06:16 AM PST #
Werner, I believe you're either not running 64-bit, or more likely your Firefox is 32-bit. I do not use openSUSE so I wouldn't know for sure, but wrong ELF class normally shows that you're trying to run binaries for the wrong architecture.
Posted by Ng Oon-Ee on February 01, 2009 at 01:13 AM PST #
Ng Oon-Ee: Well, according to a private conversation with Werner, I have the feeling the Firefox should be 64bit version, but still - Werner, could you try to open help about and see what is in the bottom? My output on my laptop (x86) is:
Mozilla/5.0 (X11; U; Linux **i686**; en-US; rv:1.9.0.5) Gecko/2008121622 Ubuntu/8.10 (intrepid) Firefox/3.0.5
There should be mentoned it is 64bit version... just in case openSUSE used 32bit version for some reason...
(And again - I appologize for the problems with posting - currently, evetything is marked as a spam for some reason and there is nothing I can do about it.)
Posted by Petr Dvorak on February 01, 2009 at 03:23 AM PST #
OK, my friend just tested it with openSUSE and he made it work with:
Mozilla/5.0 (X11; U; Linux x86_64; cs-CZ; rv:1.9.0.5) Gecko/2008121300 SUSE/3.0.5-0.1 Firefox/3.0.5
Posted by Petr Dvorak on February 01, 2009 at 10:13 AM PST #
Hi Petr
Thanks for all your help so far.
On my firefox (just upgraded this morning) :
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6
Under about:plugins the plugin does not get listed.
Still get the message:
LoadPlugin: failed to initialize shared library /opt/java/jre1.6.0_12/lib/amd64/libnpjp2.so [/opt/java/jre1.6.0_12/lib/amd64/libnpjp2.so: wrong ELF class: ELFCLASS64]
What I have tried:
- removing all plugins only keeping default and java plugin
- tried copying java lib into plugins directory instead of linking (same message different path)
I am using openSUSE 10.2
more precisely:
Linux amy 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux
What version of openSUSE was your friend using?
Posted by Werner Stucky on February 05, 2009 at 02:58 AM PST #
My friends info is:
Linux qed 2.6.25.20-0.1-default #1 SMP 2008-12-12 20:38:30 +0100 x86_64 x86_64 x86_64 GNU/Linux
So he uses a newer kernel version - probably with openSUSE 11 (and older Mozilla)...
Posted by Petr Dvorak on February 05, 2009 at 03:20 AM PST #
Hi Petr
I have got it to work. I downloaded and installed the official SUSE packages not the firefox downloaded from mozilla.
Worked like a charm. Thanks for all your help.
Posted by Werner Stucky on February 05, 2009 at 03:52 AM PST #
It came out of beta, and still doesn't work on RHEL 4.7 with Firefox 3.0.1. I'm installing from rpms (run the "bin" file as non-root user, then keep the rpms for installation by root).
I found I have to go to Tools -> Add ons -> Plugins; highlight libnpjp2.so, and click "Enable".
When I do that, and visit www.java.com/en/download/help/testvm.xml, the browser crashes with:
--------------------
firefox-bin: ../../../../src/plugin/solaris/plugin2/common/JavaVM.c:104: InitializeJVM: Assertion `foundJVM' failed.
/usr/lib64/firefox-3.0.1/run-mozilla.sh: line 131: 28161 Aborted
"$prog" ${1+"$@"}
--------------------
Let's see if Red Hat can give me a clue on this...
Posted by Rich on February 06, 2009 at 01:14 PM PST #
Rich: I had exactly the same problem, same message. Tried a lot of things and all of the sudden it works. Here's what solved it for me:
1. I installed the .bin file like this (root privileges): sh java_plugin.bin (i.e.not thru /.java_plugin.bin)
2. Found the jre1.6.0_12/lib/amd64/libnpjp2.so plugin and created a symbolic link to where my firefox plugins are:
cd /usr/lib/mozilla/plugins
/usr/lib/mozilla/plugins$ sudo ln -s /opt/java/jre1.6.0_12/lib/amd64/libnpjp2.so
3. I started firefox from console with root priviliges (don't know why but it seemed crucial in my case)
4. Went on java.com, tested the java version and it worked like a charm...
Hope it helps!
Posted by aSh on February 07, 2009 at 06:48 AM PST #
It seems that you make the files owned by root during the installation and you need to run firefox as root... This is really not very convenient:(...
Anyway, thank you for the steps, if you find some better ones, please do not hesitate to post them. Unfortunatelly, I am not able to test on RHEL as I don't know anyone who uses it:(... sorry...
Posted by Petr Dvorak on February 07, 2009 at 09:02 AM PST #
Petr: No, you got me wrong - I only started firefox once as root. I did because when I launched it regularly after simlinking the newly installed java plugin for the first time, firefox was behaving oddly - it was desperately slow and unresponsive and it wouldn't store visited sites in history (history was empty ergo I was unable to navigate thru back and forward buttons). So I just tried to launch it as root, and - though I have no clues how this could have helped - it got "fixed": my history was back, I was able to navigate, the java plugin was working...I also was affraid that I will have to launch FF as root in order it to work properly but when then launched it "regularly" everything was OK...go figure...anyway - I'm really happy now and thanks for inspiration! :))))
Posted by aSh on February 07, 2009 at 10:23 AM PST #
aSh's method worked perfect for me. Thanks so much! Been waiting ages for this...
Posted by morgo on February 11, 2009 at 11:26 PM PST #
Thanks aSh. Mine's working now.
I'm puzzled. I feel like I've just repeated the same steps I did before. Then it didn't work, this time it did.
Again, I had to enable the plugin through the menu.
In my installation, I link /usr/lib64/firefox-addons/plugins to /usr/lib64/mozilla/plugins/.
Thanks guys!
Posted by Rich on February 12, 2009 at 12:34 PM PST #
Thank you for your elaboration, aSh!
This is exactly the reason why discussions under blog posts are a must (they are usually more useful than the post itself).
So now it works for RHEL too...
Posted by Petr Dvorak on February 12, 2009 at 01:56 PM PST #
Petr: rado se stalo....bez tve iniciativy bych se k tomu ani nedostal, takze kudos jdou hlavne tobe :)
Sorry everyone for not having used English in my last post, I just wanted to cheer up my compatriot a bit :)
Posted by aSh on February 16, 2009 at 04:11 PM PST #
Yesss, this works. :D
Thank you
Posted by halfpi on June 11, 2009 at 05:17 AM PDT #
I'm getting this same error ... wrong elf class, etc. I'm running 64 bit Ubuntu and Firefox 3.5.2 that I've downloaded from mozilla.org. What I don't understand is why the version of FF downloaded from mozilla.org can't use 64 bit plugins? I've download the 64 bit version after all. The version from mozilla.org does load the 32 bit Flash plugin but I can't get either the 32 or 64 bit Java plugin to work.
The FF build in the Ubuntu repos will work, however I like to update FF as soon as a new build is released, and the repos are quite as timely as I like.
Any insight is very much appreciated.
Posted by Andrew on August 18, 2009 at 02:30 PM PDT #
It work fine on Fedora 11 64bit, Firefox 3.5.2, Sun JDK 1.6.16
But you must remove the default Java plugin IceTea.
Make sure this link look like:
[root@localhost ]# ls -l /etc/alternatives/libjavaplugin.so.x86_64
lrwxrwxrwx. 1 root root 47 3 set 12:53 /etc/alternatives/libjavaplugin.so.x86_64 -> /usr/java/jdk1.6.0_16/jre/lib/amd64/libnpjp2.so
Hope it helps!
Posted by jm on September 04, 2009 at 01:17 AM PDT #
this is cool, this is what we want dude......
Posted by links london on November 26, 2009 at 06:49 PM PST #
Rich:
I had same problem of
firefox-bin: ../../../../src/plugin/solaris/plugin2/common/JavaVM.c:104: InitializeJVM: Assertion `foundJVM' failed.
I figured out that my problem was copying libnpjp2.so to /usr/lib64/mozilla/plugins instead of linking it there.
This could be the difference between why it worked the second time instead of the first time (rather than running it as root)
I know that the flash plugin used to prefer being installed as a link instead fully copying it. Now Java seems to behave that way as well
Posted by scott on December 01, 2009 at 03:26 PM PST #
<a href="http://www.linksoflondonbest.com/links-of-london-chains-c-7.html">links of london friendship bracelet</a>
<a href="http://www.linksoflondonbest.com/links-of-london-rings-c-6.html">links of london sweetie</a>
<a href="http://www.linksoflondonbest.com/links-of-london-rings-c-6.html">links of london ring</a>
Posted by links of london on December 16, 2009 at 02:51 AM PST #
It helped me to see JBoss Web Console applet. Unfortunately applet does not work with openjdk6-plugin. So thanks a lot!
Posted by Marek Slama on January 22, 2010 at 08:50 AM PST #