PDA

View Full Version : Java & firefox 64 working?


linuxted
23rd May 2005, 12:04 AM
This seems to be the main prob I'm having now.

If it simply is unavailable, any help reverting to 32bit would be appreciated.

Thanks

imdeemvp
23rd May 2005, 08:09 AM
I rencently updated this java how-to (http://www.fedoraforum.org/forum/showthread.php?t=29928) see if helps.

bytesniper
25th May 2005, 07:02 AM
Very nice HowTo, imdeemvp, but won't work with 64 bit firefox simply becuase Sun hasnt made a 64bit browser plugin.. yet. They have the 64bit runtime and sdk but they don't include the plugin. Instead i used Blackdown Java-Linux (http://www.blackdown.org/java-linux/java2-status/jdk1.4-status.html) which seems to work excellently. If anyone figures out how to make Flash work in 64bit firefox you would be my new hero.....

ftp://ftp.tux.org/pub/java/JDK-1.4.2/amd64/fcs
The one you need is j2re-1.4.2-fcs-linux-amd64.bin.
You can get the sdk instead, if you want, but the download is slllloooowww and its almost three times the size.

Semi-quick How-To:
Disclaimer: I am actually running FC4Test3_64bit, but I would assume it would be pretty much identical in FC3 64bit, and FC4 when its released.

After downloading, su to root, extract rpm, and agree to the license like so:
$ chmod a+x j2re-1.4.2-fcs-linux-amd64.bin
$ sh j2re-1.4.2-fcs-linux-amd64.bin
When this is run it will create a directory called j2re1.4.2 in the current directory. This does not use an rpm installer, it simply extracts out everything you need into that directory so it wiill need to be copied to a usable location. I recommend /usr/java since it should already exists on your system.

From the same location you extracted the .bin:
$ cp -r j2re1.4.2 /usr/java
Now for the plugin. The plugin directory for the version of firefox that is installed with FC4Test3 is /usr/lib64/firefox-1.0.4/plugins. If you want the plugin to work for Mozilla there are actually 3 mozilla directories under /usr/lib64: /mozilla, /mozilla-1.7.7, and /mozilla-1.7.8. All of which have plugin directories but since I dont use mozilla I havent messed with them to see which one (maybe all of them) need the plugin link.

To create the link for Firefox:
ln -s /usr/java/j2re1.4.2/plugin/amd64/mozilla/libjavaplugin_oji.so /usr/lib64/firefox-1.0.4/plugins/libjavaplugin_oji.so
Viola.. that should be it. Open up firefox and type about:plugins and you should now see a large section under Java(TM) Plug-in Blackdown-1.4.2 and you can test it out here. (http://java.sun.com/products/jfc/tsc/articles/getting_started/applet_test.html)

You may also want to use this for actual java applications as well. If you were to run java right now you would be using the default in FC which is gij, an interpreter for Java bytecode. The easiest way to fix this is to use alternatives since the java link in /usr/bin is already setup to it.

Tell alternatives about the new installation of java:
$ alternatives --install /usr/bin/java java /usr/java/j2re1.4.2/bin/java 2
$ alternatives --config java
And you will see:
There are 2 programs which provide 'java'.

Selection Command
-----------------------------------------------
* 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /usr/java/j2re1.4.2/bin/java

Enter to keep the current selection[+], or type selection number: 2

Enter "2" to choose to reassociate the link to the blackdown j2re1.4.2 we just installed. You can then type which java or java -version if you want, it should read:
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2)
Java HotSpot(TM) 64-Bit Server VM (build Blackdown-1.4.2-fcs, mixed mode)
Not quite done yet. Dust off your favorite editor your going to need it briefly. I use nano, but substitute anything your confortable with.
nano /etc/profile.d/java64.sh
there are only 2 lines that needs to be in here that sets the java home path and then adds it to your path environment variable everytime you boot:
export J2RE_HOME=/usr/java/j2re1.4.2
export PATH=$PATH:/$J2RE_HOME/bin
Save the changes and exit the editor and type the following to make the script executable:
chmod +x /etc/profile.d/java64.sh
Last step: we need to make make those variables immediately available:
source /etc/profile.d/java64.sh

You should theoretically have a complete installation of the Java2 Runtime Environment both for standalone java applications and as a firefox plugin. If I forgot anything or got something wrong please let me know :)

wtg_photos
16th June 2005, 11:36 PM
I'm using Mozilla in FC4. I used your method and it got me farther than I had gotten with any other. However, when a page opens with java, the browser crashes. I tried removing the link from just the /usr/lib64/mozilla/plugin folder. Then the page just says I'm missing the plugin. I also tried removing the link from just the /usr/lib64/mozilla-1.7.8/plugin folder. Java works but the browser still crashes. Any suggestions?
thanx :)

Still can't get Flash to work either...

wtg_photos
16th June 2005, 11:55 PM
Never mind...It works great. It only seems to crash on Sun's Java site. Oh well. Thanks for the help.

r1348
17th June 2005, 10:42 AM
First post!
I'm using FC4 x86_64, every time I try to run j2sdk-1.4.2-fcs-linux-amd64.bin it prompts these errors:

./j2sdk1.4.2/lib/unpack: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Failed to unpack jar files lib/tools.jar. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.nCreating ./j2sdk1.4.2/jre/lib/rt.jar
./j2sdk1.4.2/lib/unpack: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Failed to unpack jar files jre/lib/rt.jar. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.nCreating ./j2sdk1.4.2/jre/lib/jsse.jar
./j2sdk1.4.2/lib/unpack: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Failed to unpack jar files jre/lib/jsse.jar. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.nCreating ./j2sdk1.4.2/jre/lib/charsets.jar
./j2sdk1.4.2/lib/unpack: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Failed to unpack jar files jre/lib/charsets.jar. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.nCreating ./j2sdk1.4.2/jre/lib/ext/localedata.jar
./j2sdk1.4.2/lib/unpack: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Failed to unpack jar files jre/lib/ext/localedata.jar. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.nCreating ./j2sdk1.4.2/jre/lib/plugin.jar
./j2sdk1.4.2/lib/unpack: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Failed to unpack jar files jre/lib/plugin.jar. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.nCreating ./j2sdk1.4.2/jre/javaws/javaws.jar
./j2sdk1.4.2/lib/unpack: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Failed to unpack jar files jre/javaws/javaws.jar. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.nERROR: Installation failed. Please refer to the Troubleshooting Section of the Installation Instructions

In fact, I've libstdc++.so.6 in both /usr/lib and /usr/lib64.
Is there a way to revert back to libstdc++.so.5? I absolutely need a java SDK working on my pc!

Is this method (http://forums.fedoraforum.org/showthread.php?t=59385) actually working on an AMD64?

r1348
17th June 2005, 12:17 PM
yum install compat-libstdc++-33.x86_64

-_-

Ok solved that, forget my last post.

r1348
17th June 2005, 12:33 PM
Ok I managed to get the Java SDK working, with all the java, javac, jre commands.
Now the only thing that doesn't seem to work is the plugin, I linked it in the right folder, and I can see from about:plugins that Firefox actually detects it, but any time I try to open java applets on the web, the browser just crashes. Is there a firefox report log I can check? /var/log/messages isn't reporting anything.

bytesniper
17th June 2005, 03:09 PM
does it just exit without any errors whatsoever? if so if you open a terminal and start firefox from there it will open but when it takes the plunge it should dump the errors to the terminal you started it from.

wtg_photos
17th June 2005, 09:17 PM
Here's what I got:

# mozilla
Segmentation fault

When I ran firefox it closed with no errors

This happens ONLY on Sun Java's Site for me.

Java works fine on other sites.

I am using Blackdown's amd64 java.

r1348
17th June 2005, 10:11 PM
You have to add an url directly to the firefox command line to see the error reports:

[root@localhost ~]# firefox http://www.myrrthronth.de
UA: Mozilla/5.0 (X11; U; Linux x86_64; it-IT; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4:, extra: Firefox/1.0.4
Java process: caught exception from sun.plugin.navig.motif.Plugin.start
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/java/jre/lib/amd64/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:1586)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1503)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at sun.security.action.LoadLibraryAction.run(LoadLibr aryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1437)
at java.awt.Toolkit.<clinit>(Toolkit.java:1458)
at java.awt.Color.<clinit>(Color.java:250)
at sun.plugin.navig.motif.Plugin.start(Plugin.java:71 )
INTERNAL ERROR on Browser End: Could not read ack from child process
System error?:: Resource temporarily unavailable
[1]+ Exit 255 firefox

And I maybe also found some workaround for this here: http://www.linuxquestions.org/questions/archive/17/2005/01/2/234193
But the real problem now is that I've no libXp.so.6 libraries on my system :D Where can I get it?

r1348
17th June 2005, 10:25 PM
yum install xorg-x11-deprecated-libs.x86_64 :D

Nice it seems posting on this forum boosts my neurons!

Alright, now everything works as it should do, I hope my (almost) monologue will be useful to others!

jjjasper
18th June 2005, 10:45 PM
Good! I had the same problem (cannot load libstdc++.so.5, no such file etc)

Two things:
yum install compat-libstdc++-33.x86_64 don't work, use
yum install compat-libstdc++.x86_64

and about the slow download at blackdown: you might want to try one of the mirrors: http://www.blackdown.org/java-linux/java-linux-d2.html

thanx r1348

notmyrealemail
28th May 2006, 07:44 PM
I am having this same problem with Java, tried instructions all over the net, nothing seems to work. I am work not and came upon this forum, I am excited to try this when I get home.

Do you think this will work the same in FC5?

Good looks, thnks.

notmyrealemail
4th June 2006, 11:57 PM
thks, worked for FC5 64

just had to do yum install compat-libstdc++-33.x86_64 and change the one line to ln -s /usr/java/j2re1.4.2/plugin/amd64/mozilla/libjavaplugin_oji.so /usr/lib64/firefox-1.5.0.3/plugins/libjavaplugin_oji.so to reflect my firefox version.

thks much

bazzoon
20th June 2006, 09:04 PM
If anyone figures out how to make Flash work in 64bit firefox you would be my new hero.....

try gnash (http://www.gnu.org/software/gnash). It does not support all the flash 7 features though as of yet.

Imiro
17th July 2006, 06:43 PM
An other happy customer =) Worked like charm with FC5 x86_64

Edmonton Photos on Instagram - San Jose Instagram Photos - Democratic Republic of the Congo Photos -