Bug 161825

Summary: Java applets do not work
Product: [Applications] konqueror Reporter: Daniel Moyne <dmoyne>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: andresbajotierra, daniel.moyne, finex, jtamate, maksim, matej, pino
Priority: NOR Keywords: triaged
Version: 4.0.3   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel Moyne 2008-05-08 23:52:44 UTC
Version:           4.0.3 (using KDE 4.0.3)
Installed from:    Unspecified Linux
Compiler:          Target: x86_64-linux-gnu
OS:                Linux (x86_64) release 2.6.24-16-generic

When running an applet that works fine on Konqueror 3.5.9 it fails to run on Konqueror 4.0.3 with this error message :

alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!

I am in both cases using this java version :
/usr/local/Java/jdk1.6.0_10/bin/java
Comment 1 Aldoo 2008-05-09 21:03:14 UTC
I confirm this in 4.0.4 kubuntu (and the bug isn't new from 4.0.3 if I remember right).
Comment 2 Magnus Kessler 2008-07-21 13:54:05 UTC
I can confirm this behaviour even with the 4.1-RC1 builds on both kubuntu and gentoo
Comment 3 Dario Andres 2008-07-31 03:43:09 UTC
Using KDE 4.1.00 (KDE 4.1.0) (KDEmod) in ArchLinux i686
JRE 6u7
I can reproduce this bug.
Comment 4 Igor 2008-08-01 06:36:40 UTC
doesn't work in ArchLinux, kde 4.1.00 (4.1.0) (not kdemod), java 1.6u7
Comment 5 Kenzo Martins Matuzawa 2008-08-02 22:06:47 UTC
I confirm this bug here too.
KDEmod 4.1 with jre 6u7 on Arch.
Comment 6 Pino Toscano 2008-08-06 12:18:11 UTC
*** Bug 168496 has been marked as a duplicate of this bug. ***
Comment 7 Pino Toscano 2008-08-06 20:58:18 UTC
SVN commit 843223 by pino:

Use the right cmake variable for the data directory, so the policy file points to the correct directory.
The mismatch may happen in case a particular datadir is set, eg by some distro.

This may fix bug #161825.
CCBUG: 161825


 M  +1 -1      kjava.policy.in.cmake  


WebSVN link: http://websvn.kde.org/?view=rev&revision=843223
Comment 8 Pino Toscano 2008-08-06 20:59:21 UTC
SVN commit 843224 by pino:

Backport SVN commit 843223 by pino:

Use the right cmake variable for the data directory, so the policy file points to the correct directory.
The mismatch may happen in case a particular datadir is set, eg by some distro.

This may fix bug #161825.
CCBUG: 161825


 M  +1 -1      kjava.policy.in.cmake  


WebSVN link: http://websvn.kde.org/?view=rev&revision=843224
Comment 9 Pino Toscano 2008-08-06 21:01:28 UTC
Who compiles from sources (either trunk/4.2 or branch/4.1) and has the problem, please update and report whether the problem is fixed.
For people who use distro packages, please (hopefully) wait for KDE 4.1.1 and verify again.

Thanks for the cooperation.
Comment 10 Matěj Laitl 2008-08-28 18:37:17 UTC
Hi,
KDE 4.1.0, my kjava.policy seems to be okay, but java in konqueror still does not work [1]. It works in Konq 3.5.9.

esprimo ~ # grep codeBase /usr/kde/4.1/share/apps/kjava/kjava.policy
grant codeBase "file:/usr/kde/4.1/share/apps/kjava/-"

[1] http://www.java.com/en/download/help/testvm.xml
Comment 11 Maksim Orlovich 2008-08-28 18:51:31 UTC
re: comment #10: also please make sure you have the mimetype application/x-java-applet available.
Comment 12 Matěj Laitl 2008-08-28 20:14:20 UTC
Maksim,
I do have onely application/x-java (which has kjavaappletviewer as associated kpart) and application/x-java-archive.

What package is responsible for that mime info, sun-java?
Comment 13 Pino Toscano 2008-08-29 00:12:03 UTC
(In reply to comment #12)
> What package is responsible for that mime info, sun-java?

kdelibs.

Please verify the following:
$ kde4-config --path xdgdata-mime
its output should contain a subdirectory of `kde4-config --prefix`.
If it does not, see what
$ env | grep XDG
returns.
Comment 14 Matěj Laitl 2008-08-29 00:40:33 UTC
Thanks for your quick reply, Pino.

My environment seem correctly setup:

strohel@esprimo ~ $ kde4-config --path xdgdata-mime
/home/strohel/.local/share/mime/:/usr/kde/4.1/share/mime/:/usr/share/mime/
strohel@esprimo ~ $ kde4-config --prefix
/usr/kde/4.1
strohel@esprimo ~ $ env | grep XDG
XDG_CONFIG_DIRS=/usr/kde/4.1/etc/xdg
XDG_DATA_DIRS=/usr/kde/4.1/share:/usr/share
strohel@esprimo ~ $ grep -r applet /home/strohel/.local/share/mime/
strohel@esprimo ~ $ grep -r applet /usr/kde/4.1/share/mime/
/usr/kde/4.1/share/mime/packages/kde.xml:  <mime-type type="application/x-java-applet">
/usr/kde/4.1/share/mime/packages/kde.xml:    <comment>Java applet</comment>
strohel@esprimo ~ $ grep -r applet /usr/share/mime
mime/      mime-info/ mimelnk/
strohel@esprimo ~ $ grep -r applet /usr/share/mime/
strohel@esprimo ~ $

However, java applets do not work and application/x-java-plugin entry does not show up in System Settings → File Associations.

I've found that also some other mimetypes from /usr/kde/4.1/share/mime/packages/kde.xml do not appear in File Associations, for example application/metalink+xml, application/x-cda.. Isn't that because they don't have their own .xml files? Dunno.

Using shared-mime-info-0.30.
Comment 15 Pino Toscano 2008-08-29 00:45:08 UTC
(In reply to comment #14)
> However, java applets do not work and application/x-java-plugin entry does not
> show up in System Settings → File Associations.

Try the following:
as root: update-mime-database /usr/kde/4.1/share/mime
then, as user: kbuildsycoca4 --noincremental

How did you install kde4? Because it seems update-mime-database was not run on installation...
Comment 16 Matěj Laitl 2008-08-29 01:09:36 UTC
(In reply to comment #15)
> Try the following:
> as root: update-mime-database /usr/kde/4.1/share/mime
> then, as user: kbuildsycoca4 --noincremental
> 
> How did you install kde4? Because it seems update-mime-database was not run on
> installation...

Oh yes, it did the trick, Java working. So this is definitely a Gentoo bug, will report that.

(I suspect it does not work with all combinations of "Use security manager", "Use KIO", and "Shutdown applet server when inactive", but that would be another bug and I have to investigate more deeply)

So, thanks you, Pino and Maksim, for your cooperation.

As far as I'm concerned, this could be closed as WORKSFORME.
Comment 17 Jaime Torres 2008-10-12 13:03:35 UTC
It works also for me in konqueror 4.1.68 (opensuse unstable).
Comment 18 Dario Andres 2008-12-28 15:41:55 UTC
Can anyone still reproduce this bug with a recent KDE version? (4.1.3 / 4.2beta2 / 4.2svn) or trying comment 15 ? Thanks :) 
Comment 19 Matěj Laitl 2008-12-30 22:44:41 UTC
(In reply to comment #18)
> Can anyone still reproduce this bug with a recent KDE version? (4.1.3 /
> 4.2beta2 / 4.2svn) or trying comment 15 ? Thanks :) 
> 

Not really. Should be closed IMO.

Matěj.
Comment 20 FiNeX 2010-08-02 21:22:47 UTC
Closing as worksforme (no feedback in two years).