Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6888118

JNLP Extension Installer is never invoked when uninstalling application

    Details

    • Subcomponent:
    • Introduced In Build:
      b01
    • Introduced In Version:
    • Resolved In Build:
      b04
    • CPU:
      x86
    • OS:
      windows_xp

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.6.0_16"
        Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
        Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows XP [version 5.1.2600]

        A DESCRIPTION OF THE PROBLEM :
        According to JSR-56 v 6.0.10 uninstall should be possible through the "extension installer" mechanism:

        "3.8.2: Installer Extension
        ...
        main-class attribute: The name of the class containing the public static void main(String[]) method of an installer/uninstaller for this extension."

        My interpretation is that the designated main class should also be invoked on uninstall. JWS never invokes the designated main class when the application is uninstalled from the Java Control Panel.

        However, uninstalling the extension installer itself (not the application) will invoke the designated Main class with the argument "uninstall". This can be achieved by opening the "Java Cache Viewer" of the "Java Control Panel" and then setting show="resources", rightclick the extension installer JNLP file and selecting "delete".

        I believe this is a bug, users have no chance of finding the right JNLP file to delete under the "resources" view of the "Java Cache Viewer", this should happen automatically when the main application is being uninstalled.

        In our case we built an instant messenger in JWS that starts automatically when the user logs into his windows account. The platform dependent functionality needed for this is installed by a JNLP extension installer. Since uninstalling the application for the "Java Control Panel" or the windows "add/remove programs" only removes the main application but not the platform dependent pieces of the application the result is that the user gets some nasty errors _every time_ he logs into windows after uninstalling the application.

        I believe this bug belong in the category "catastrophic". Internet users will perceive Java as malware.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        The JNLP of the main application refers to the extension installer "installer.jnlp" in the resources section:

        <resources>
        <j2se version="1.6+" />
        <extension href="installer.jnlp" />
        <jar href="client.jar" />
        <jar href="lib/jnlp.jar" />
        </resources>

        The "installer.jnlp" designates a Main class to invoke on install and uninstall:

           <resources>
        <j2se version="1.6+" />
             <jar href="installer.jar' main='true' />
             <jar href="lib/jnlp.jar" />
           </resources>
           <installer-desc main-class='Installer' />

        The "Installer" class can do something simple to show when its invoked:

        public class Installer {
        public static void main(String[] args) {
        JFrame frame = new JFrame();
        try {
        JOptionPane.showMessageDialog(frame, "Installer invoked");
                        ...

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        I would expect the Installer class to be invoked when I open the "Java Control Panel", go to "Java Cache Viewer", set show="Application", select the application name and press the unistall button.

        I only get the popup from the sample Install class described earlier when I delete the "installer.jnlp" file from the resources view of the "Java Cache Viewer".

        REPRODUCIBILITY :
        This bug can be reproduced always.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  herrick Andy Herrick
                  Reporter:
                  ndcosta Nelson Dcosta (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: