application/x-java-applet;jpi-version=1.6.0_06
Deepak Bhole
dbhole at redhat.com
Fri Jan 10 08:57:27 PST 2014
* Jiri Vanek <jvanek at redhat.com> [2014-01-02 07:13]:
> On 01/01/2014 11:16 PM, Jack Bates wrote:
> Hello!
> >
> >Firefox complains "A plugin is needed to display this content." when I try to access Oracle Forms. I
> >am running a fresh install of Ubuntu 13.10 plus the icedtea-6-plugin package, version 1.4. The
> >plugin is detected by Firefox when I visit both about:addons and about:plugins
> >
> >I reduced the Oracle Forms landing page to this test case:
> >
> > http://nottheoilrig.com/java/201306210
>
> Thank you for reproducer!
> >
> >Firefox complains with the same error when I visit this test case ("A plugin is needed to display
> >this content.") but the error goes away if I drop the "jpi-version" from the test case.
> >Unfortunately I can't drop the "jpi-version" from the actual Oracle Forms landing page.
>
>
> This appeared to be more tricky then I thought at first. The
> attached patch is fixing the reproducers behaviour, however there is
> issue, that this type of definition requires exact hardccoded "_06"
> in mime descripor.
>
I am against doing this. The documentation[1] states:
"The recommended usage of the <embed> tag is to not specify any version
or jpi-version in the MIME type of the applet. Instead, use the
java_version parameter to choose a particular JRE version upon which to
run the applet."
1: http://www.oracle.com/technetwork/java/javase/index-141751.html#JPI_VERSION
>From what I can tell, Oracle Forms is essentially hardcoding the
required JDK version which is a bad way to do things (especially since
1.6.0_06 was released in April 2008 and is extremely insecure).
The proprietary Oracle plug-in only supplies a specific jpi-version that
corresponds to the JDK it is shipped with, and not previous ones.
The Oracle Forms app needs to be updated. I understand that the user has
little say in this sometimes but I would really like to avoid changing
ITW to accommodate badly written apps.
Cheers,
Deepak
> If Forms works for you, I would be happy to include
>
> "application/x-java-applet;jpi-version=1.6.0_06:class,jar:IcedTea;"
> "application/x-java-bean;jpi-version=1.6.0_06:class,jar:IcedTea;"
>
> strings to itw when compiled by jdk7.
>
>
> Currently, when icedtea-web is compiled by jdk6 it is using:
> "application/x-java-applet;jpi-version=1.6.0_50:class,jar:IcedTea;"
> "application/x-java-bean;jpi-version=1.6.0_50:class,jar:IcedTea;"
> and when jdk7.
> "application/x-java-applet;jpi-version=1.7.0_50:class,jar:IcedTea;"
> "application/x-java-bean;jpi-version=1.7.0_50:class,jar:IcedTea;"
>
>
> So actually the issue will not be fixed by compilation by jdk6.
>
>
> The oracle forms are requesting *exactly* 1.6.0_06 version, so even if we include
>
> "application/x-java-applet;jpi-version=1.6.0_50:class,jar:IcedTea;"
> "application/x-java-bean;jpi-version=1.6.0_50:class,jar:IcedTea;"
>
> then your applet will still not be detected by firefox properly :(
>
> As I'm not aware of any wildchars for mimedescritptiors, the only
> correct approach seems to be some generated list of:
> "application/x-java-applet;jpi-version=1.6.0_01:class,jar:IcedTea;"
> "application/x-java-applet;jpi-version=1.6.0_02:class,jar:IcedTea;"
> ...
> "application/x-java-applet;jpi-version=1.6.0_99:class,jar:IcedTea;"
> "application/x-java-bean;jpi-version=1.6.0_01:class,jar:IcedTea;"
> "application/x-java-bean;jpi-version=1.6.0_02:class,jar:IcedTea;"
> ....
> "application/x-java-bean;jpi-version=1.6.0_99:class,jar:IcedTea;"
> "application/x-java-applet;jpi-version=1.7.0_01:class,jar:IcedTea;"
> "application/x-java-applet;jpi-version=1.7.0_02:class,jar:IcedTea;"
> ...
> "application/x-java-applet;jpi-version=1.7.0_99:class,jar:IcedTea;"
> "application/x-java-bean;jpi-version=1.7.0_01:class,jar:IcedTea;"
> "application/x-java-bean;jpi-version=1.7.0_02:class,jar:IcedTea;"
> ....
> "application/x-java-bean;jpi-version=1.7.0_99:class,jar:IcedTea;"
>
> "application/x-java-applet;jpi-version=1.8.0_01:class,jar:IcedTea;"
> "application/x-java-applet;jpi-version=1.8.0_02:class,jar:IcedTea;"
> ...
> "application/x-java-applet;jpi-version=1.8.0_99:class,jar:IcedTea;"
> "application/x-java-bean;jpi-version=1.8.0_01:class,jar:IcedTea;"
> "application/x-java-bean;jpi-version=1.8.0_02:class,jar:IcedTea;"
> ....
> "application/x-java-bean;jpi-version=1.8.0_99:class,jar:IcedTea;"
> ...jdk9?...10/?...
>
> Which you must admit will look in about:plugins even more terrible then current loong list
>
> or maybe some custom mime types definitions in itw-settings?
>
> I have CCed Deepak, who once studied the mimetypes, maybe he will have better idea.
>
> Also maybe good idea may be to Contact oracle with the issue and ask them to remove this restriction.
>
> >
> >Can IcedTea-Web run the Oracle Forms applet?
>
> I don't know. Can I try somewhere? Or can you try rebuilt icedtea-web with attached patch?
>
> Best regards,
> J.
>
>
> diff -r 1b804476f47e Makefile.am
> --- a/Makefile.am Thu Jan 02 11:47:21 2014 +0100
> +++ b/Makefile.am Thu Jan 02 12:51:00 2014 +0100
> @@ -123,6 +123,7 @@
>
> # Fake update version to work with the Deployment Toolkit script used by Oracle
> # http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/depltoolkit_index.html
> +# be aware of usage in IcedTeaNPPlugin.cc
> export JDK_UPDATE_VERSION=50
>
> # Sources list
> diff -r 1b804476f47e plugin/icedteanp/IcedTeaNPPlugin.cc
> --- a/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Jan 02 11:47:21 2014 +0100
> +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Jan 02 12:51:00 2014 +0100
> @@ -62,13 +62,21 @@
> #define PLUGIN_DESC "The <a href=\"" PACKAGE_URL "\">" PLUGIN_NAME "</a> executes Java applets."
>
> #ifdef HAVE_JAVA7
> +// regullar jpi support, JDK_UPDATE_VERSION is *hardcoded* in Makefile.am to 50
> #define JPI_VERSION "1.7.0_" JDK_UPDATE_VERSION
> #define PLUGIN_APPLET_MIME_DESC7 \
> "application/x-java-applet;version=1.7:class,jar:IcedTea;"
> #define PLUGIN_BEAN_MIME_DESC7 \
> "application/x-java-bean;version=1.7:class,jar:IcedTea;"
> +// hacky approach to support jpi of 6 in jpi of 7
> + #define JPI6_VERSION \
> + "application/x-java-applet;jpi-version=1.6.0_06:class,jar:IcedTea;" \
> + "application/x-java-bean;jpi-version=1.6.0_06:class,jar:IcedTea;"
> #else
> +// regullar jpi support
> #define JPI_VERSION "1.6.0_" JDK_UPDATE_VERSION
> +// no need to re-deffine
> + #define JPI6_VERSION
> #define PLUGIN_APPLET_MIME_DESC7
> #define PLUGIN_BEAN_MIME_DESC7
> #endif
> @@ -109,7 +117,8 @@
> "application/x-java-bean;version=1.6:class,jar:IcedTea;" \
> PLUGIN_BEAN_MIME_DESC7 \
> "application/x-java-bean;jpi-version=" JPI_VERSION ":class,jar:IcedTea;" \
> - "application/x-java-vm-npruntime::IcedTea;"
> + "application/x-java-vm-npruntime::IcedTea;" \
> + JPI6_VERSION
>
> #define PLUGIN_URL NS_INLINE_PLUGIN_CONTRACTID_PREFIX NS_JVM_MIME_TYPE
> #define PLUGIN_MIME_TYPE "application/x-java-vm"
More information about the distro-pkg-dev
mailing list