JDK-6888118 : JNLP Extension Installer is never invoked when uninstalling application
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2009-10-05
  • Updated: 2011-02-16
  • Resolved: 2009-10-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u18 b04Fixed 7Fixed
Related Reports
Relates :  
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.

Comments
EVALUATION Before 6u12, when uninstalling an application, we uninstalled all of the jar and nativelib resources of all of it's extensions, however we never seem to have uninstalled the jnlp files of the extensions. Due to fix for 6759336 in 6u12, we now do not uninstall the resources of the extensions, since many component-desc extensions are shared (like javafx) . However, installer-desc extensions are differant, not normally shared, and should be properly uninstalled when an application using them is uninstalled
05-10-2009