PDA

View Full Version : Java Plugin not working...



jeffk42
26th May 2005, 03:04 PM
I'm trying to get the Java plugin working in Firefox, but I'm having some trouble.

My laptop is an AMD64, but I have the x86 Firefox installed because of the x86_64 version's current lack of plugin support. I have JDK 5 installed (x86_64 version, for development), and JRE 5 (x86 version, just for the plugin).

So I've tried placing the symlink in /usr/lib/mozilla/plugins, /usr/lib/firefox-1.0.4/plugins, and ~/.mozilla/plugins. In each of these cases, it seems to recognize the plugin (I don't get the missing plugin icons when I try to view an applet), but the applet still doesn't load. The page is just blank. I've tried this on numerous applets.


jeffk42@zaphod:/usr/lib/firefox-1.0.4/plugins$ ls -al
total 40
drwxr-xr-x 2 root root 4096 May 25 10:01 .
drwxr-xr-x 12 root root 4096 May 26 08:54 ..
lrwxrwxrwx 1 root root 58 May 25 10:01 libjavaplugin_oji.so -> /usr/java/jre1.5.0_03/plugin/i386/ns7/libjavaplugin_oji.so
-rwxr-xr-x 1 root root 16304 May 13 14:52 libnullplugin.so


Since I'm using the 32-bit firefox and the 32-bit plugin, I don't see where the problem is. As soon as I switched to the 32-bit firefox, the Flash plugin started working correctly, but the Java stuff just won't come up. :(

Can anyone help me with this?

Thanks,
Jeff

brahms
26th May 2005, 03:44 PM
Does the java section show up in about:plugins (Type about:plugins in the firefox address bar)?

You could try closing firefox, then deleting these two files:

rm ~/.mozilla/pluginreg.dat
rm ~/.mozilla/firefox/pluginreg.dat
This forces firefox to fully rescan for installed plugins.

jeffk42
26th May 2005, 04:10 PM
Thanks, but I just tried it and it still doesn't work. After I restarted firefox, it recreated the file, and it does include the Java plugin, but nothing comes up. :(

gkuhlen
26th May 2005, 05:09 PM
I had the same problem with my desktop. I yummed the j2re and mozilla-j2re with no results. I posted here and got this reply and it works.

"ArthurKlein has just replied to a thread you have subscribed to entitled -
Another J2re question - in the General Support forum of FedoraForum.org.

This thread is located at:
http://forums.fedoraforum.org/showthread.php?t=55293&goto=newpost

Here is the message that has just been posted:
***************
Hi,

Some java based applications require a library which is not listed as a
depenency for the Dag Java rpm. Try to install the package
xorg-x11-deprecated-libs and see if it helps.

yum install xorg-x11-deprecated-libs

I yummed that file and all is well. give it a try

gkuhlen
26th May 2005, 05:11 PM
The only thing I have in my plug-ins is SWF. Is that my java? I have enable java checked and it works.

jeffk42
26th May 2005, 05:22 PM
Some java based applications require a library which is not listed as a
depenency for the Dag Java rpm. Try to install the package
xorg-x11-deprecated-libs and see if it helps.

yum install xorg-x11-deprecated-libs

I yummed that file and all is well. give it a try

It seems that I have the latest i386 and x64_64 versions of that package installed already.


Installed Packages
xorg-x11-deprecated-libs.i386 6.8.2-1.FC3.13 installed
xorg-x11-deprecated-libs.x86_64 6.8.2-1.FC3.13 installed

I haven't tried to install an rpm, I just went to the Sun site and got the bin file and extracted it where I wanted it. Although this wasn't a problem for me on my desktop box. The Java plugin works fine on that machine. :confused:

ArthurKlein
26th May 2005, 06:00 PM
Hi,

Have you tried to see if any java based applications can run such as the Java Control Panel?

cd /PATH_TO_JAVA_BIN_LOCATION/
./ControlPanel

Does running this produce any errors?

jeffk42
26th May 2005, 06:06 PM
Thanks for the reply!

Here's what I get from that (and I have no idea how to fix it)

There was an error trying to initialize the HPI library.
Please check your installation, HotSpot does not work correctly
when installed in the JDK 1.2 Linux Production Release, or
with any JDK 1.1.x release.
Could not create the Java virtual machine.

ArthurKlein
26th May 2005, 06:38 PM
Some programs are built against a different libstdc++ version. To install a compatability package provided with FC3 you need to install the package:

compat-libstdc++

If that doesn't solve your problem, then do you happen to have your Java PATH variable set? This would not affect the browser plugin but it might explain the ControlPanel error. When you type in:

java -version

do you get the same error as above? If you do get that error then type the following to be able to run the ControlPanel program:

JAVA_HOME=/usr/java/jre1.5.0_03
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME
export PATH
./ControlPanel

imdeemvp
26th May 2005, 06:45 PM
I have not been prompted for such dependency to get java working.....but this is the latest Java version installation procedures. (http://www.fedoraforum.org/forum/showthread.php?t=29928)

jeffk42
26th May 2005, 07:01 PM
I forgot all about setting the correct path info... I set JAVA_HOME and PATH as you said, but I'm still having the same problem, and ControlPanel gives me the same error. :(

jeffk42
26th May 2005, 07:05 PM
Oh, some other info related to that...

compat-libstdc++.x86_64 8-3.3.4.2 installed
compat-libstdc++.i386 8-3.3.4.2 installed
compat-libstdc++-devel.x86_64 8-3.3.4.2 installed
compat-libstdc++-devel.i386 8-3.3.4.2 installed


PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:
/usr/X11R6/bin:/home/jkraus/bin::/usr/java/jre1.5.0_03/bin/
JAVA_HOME=/usr/java/jre1.5.0_03/

Although this is weird:

jkraus@zaphod:/usr/java$ java -version

java version "1.4.2"
jdkgcj 0.3.1 (http://www.arklinux.org/projects/jdkgcj)
gcj (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I never installed 1.4.2 to this system, only jdk1.5.0_03 and jre1.5.0_03.
'yum list java*' gives me the following:

Installed Packages
java-1.4.2-gcj-compat.noarch 1.4.2.0-11jpp installed
java-1.4.2-gcj-compat-devel.noarch 1.4.2.0-11jpp installed

I don't know what's going on now. Should I just delete these, as well as all installations and just start over with the RPM's? If I do, will the JRE RPM screw up the JDK RPM install? I need both, JDK x86_64 for development and JRE x86 for the plugin.

ArthurKlein
26th May 2005, 07:24 PM
FYI: I disabled my Java path variable, and I was able to run the ./ControlPanel and ./java -version from my Java bin folder.

Can you do a strace and attach it, the file JavaStrace, to a post?

cd /PATH_TO_JAVA_BIN_LOCATION/
strace ./java -version 2> /$HOME/JavaStrace

jeffk42
26th May 2005, 07:36 PM
No problem.

The command output:

[root@zaphod bin]# ./ControlPanel
There was an error trying to initialize the HPI library.
Please check your installation, HotSpot does not work correctly
when installed in the JDK 1.2 Linux Production Release, or
with any JDK 1.1.x release.
Could not create the Java virtual machine.
[root@zaphod bin]# strace ./java -version 2> /$HOME/JavaStrace
[ Process PID=10539 runs in 32 bit mode. ]
Bus error
[root@zaphod bin]# There was an error trying to initialize the HPI library.
Please check your installation, HotSpot does not work correctly
when installed in the JDK 1.2 Linux Production Release, or
with any JDK 1.1.x release.

The file contents:

[root@zaphod ~]# cat JavaStrace
execve("./java", ["./java", "-version"], [/* 23 vars */]) = 0
uname({sys="Linux", node="zaphod", ...}) = 0
brk(0) = 0x8058000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(0x3, 0xffffcfb8) = 0
old_mmap(0x31b0900000000, 8589934593, PROT_READ|PROT_WRITE, 0xf /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE|MAP_POPULAT E|MAP_NONBLOCK|MAP_GROWSDOWN|MAP_DENYWRITE|MAP_EXE CUTABLE|MAP_LOCKED|0xfffe06c0, 64768, 0x3094e800000000) = 0x55555000
close(3) = 0
open("/lib/tls/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20 X\203"..., 512) = 512fstat64(0x3, 0xffffd04c) = 0
old_mmap(0x100000000000, 146028888067, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT _GROWSUP|0xfcfffff8, 0x4 /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE|MAP_POPULAT E|MAP_GROWSDOWN|MAP_DENYWRITE|0x5e0680, 6214904, 0x8005e6415) = 0x55587000
old_mmap(0x111dc00831000, 8804682956805, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0x831000
old_mmap(0x20000083f000, 8873402433539, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0x83f000
old_mmap(0x11dc00841000, 214748364803, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT _GROWSUP|0xfcfffff8, MAP_FILE, 0, 0) = 0x841000
close(3) = 0
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\26 0\33"..., 512) = 512
fstat64(0x3, 0xffffd030) = 0
old_mmap(0x306400741000, 8804682956805, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0x741000
old_mmap(0x200000743000, 8873402433539, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0x743000
close(3) = 0
open("/lib/tls/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20 O`\000"..., 512) = 512
fstat64(0x3, 0xffffd014) = 0
old_mmap(0x129c9c005f0000, 8804682956805, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0x5f0000
mprotect(0x713000, 27804, PROT_NONE) = 0
old_mmap(0x400000714000, 8873402433539, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0x714000
old_mmap(0x1c9c00718000, 214748364803, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT _GROWSUP|0xfcfffff8, MAP_FILE, 0, 0) = 0x718000
close(3) = 0
old_mmap(0x100000000000, 146028888067, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT _GROWSUP|0xfcfffff8, 0x4 /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE|MAP_POPULAT E|MAP_GROWSDOWN|MAP_DENYWRITE|0x5e0680, 2832, 0x20005e44a2) = 0x55588000
mprotect(0x714000, 8192, PROT_READ) = 0
mprotect(0x743000, 4096, PROT_READ) = 0
mprotect(0x83f000, 4096, PROT_READ) = 0
mprotect(0x5ec000, 4096, PROT_READ) = 0
set_thread_area(0xffffd7c4) = 0
munmap(0x55555000, 203529) = 0
set_tid_address(0x555885c8) = 10539
rt_sigaction(SIGRTMIN, {0x400835380, [], 0x5f86f8}, NULL, 0) = 0
rt_sigaction(SIGRT_1, {0x10000004008353f0, [], 0x5f86f8}, NULL, 0) = 0
rt_sigprocmask(SIG_UNBLOCK, [], NULL, 0) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=-4284481536, rlim_max=0}) = 0
Could not create the Java virtual machine.

ArthurKlein
26th May 2005, 08:26 PM
The strace doesn't show the command ever getting to any java files. It fails before it has a chance.

From your strace:

open("/lib/tls/libpthread.so.0", O_RDONLY)
open("/lib/tls/libc.so.6", O_RDONLY)

From an strace of mine:

open("/lib/tls/i686/libpthread.so.0", O_RDONLY)
open("/lib/tls/i686/libc.so.6", O_RDONLY)

What versions of glibc do you have installed?

jeffk42
26th May 2005, 08:33 PM
Installed Packages
glibc.i686 2.3.5-0.fc3.1 installed
glibc.x86_64 2.3.5-0.fc3.1 installed

Taft
26th May 2005, 08:45 PM
Although this is weird:

jkraus@zaphod:/usr/java$ java -version

java version "1.4.2"
jdkgcj 0.3.1 (http://www.arklinux.org/projects/jdkgcj)
gcj (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

That is really weird. Assuming you have java in your path, what is the output of:
$ which java

ArthurKlein
26th May 2005, 08:50 PM
All I can think of is, perhaps, java is trying to use the 64 bit library instead of the 32 bit. Can you type in the following for each of the above packages and post your results?

rpm -ql glibc | grep tls

jeffk42
26th May 2005, 08:54 PM
jkraus@zaphod:~$ rpm -ql glibc | grep tls
/lib64/tls
/lib64/tls/libc-2.3.5.so
/lib64/tls/libc.so.6
/lib64/tls/libm-2.3.5.so
/lib64/tls/libm.so.6
/lib64/tls/libpthread-2.3.5.so
/lib64/tls/libpthread.so.0
/lib64/tls/librt-2.3.5.so
/lib64/tls/librt.so.1
/lib64/tls/libthread_db-1.0.so
/lib64/tls/libthread_db.so.1
/lib/tls
/lib/tls/libc-2.3.5.so
/lib/tls/libc.so.6
/lib/tls/libm-2.3.5.so
/lib/tls/libm.so.6
/lib/tls/libpthread-2.3.5.so
/lib/tls/libpthread.so.0
/lib/tls/librt-2.3.5.so
/lib/tls/librt.so.1
/lib/tls/libthread_db-1.0.so
/lib/tls/libthread_db.so.1

And 'which java' returns '/usr/bin/java'

tdiepenb
17th June 2005, 01:24 AM
I betcha your problem is that you have gcj installed. For some reason that package makes the java virtual machine link to its shared object files instead of the correct ones. The reason I think this is that the java command is complaining that the HotSpot compiler won't run in a 1.2 JDK--but you have the 1.5 JDK installed. The HotSpot compiler wasn't even available till the 1.4 version of the jdk, so somewhere along the line there are some bogus java shared object files getting linked in that should not be. I've run into this problem before and removing any package related to gcj solved the problem.

If you can, remove any packages related to gcj and then try again.

Tom