When/how does the UNinstaller get called?

This simple demo. of using the ExtensionInstallerService

has me confused..

http://www.physci.org/jws/application.jnlp

It behaves as I expect oninstallation.

At time of installation, the user is prompted to

accept a psuedo 'license agreement'.

If they accept it, the application is launched.

If they refuse it, it is not launched.

If they refuse it, they can try again later and

the EULA dialog will be shown again, and

will continue to be shown, each launch, as

many times as the user refuses it.

But how/when is theuninstall option called?

In this example, I used the uninstaller option

simply to thank the user for using the application.

However, I do not ever see the 'thanks' dialog.

So far I have tried uninstalling the app. from both

theJava Control Panel, as well as Windows own

Add/Remove Programs dialog.

Does it work for anybody else?

The source for the installer that I am currently

using is as follows.

package test;

import javax.swing.*;

// classes of the web-start API, used in this example.

import javax.jnlp.ExtensionInstallerService;

import javax.jnlp.ServiceManager;

import javax.jnlp.UnavailableServiceException;

class Installer{

Installer(){

try{

ExtensionInstallerService installerService =

(ExtensionInstallerService)ServiceManager.

lookup("javax.jnlp.ExtensionInstallerService");

/* We do not need the progress bar as progress

is determined by the user accepting the EULA.

They can consider it as long as they like. */

installerService.hideProgressBar();

int result = JOptionPane.showConfirmDialog(null,

"Do you agree to the EULA?",

"End User License Agreement",

JOptionPane.YES_NO_OPTION,

JOptionPane.QUESTION_MESSAGE );

boolean agree = (result==JOptionPane.YES_OPTION);

if (agree){

installerService.installSucceeded(false);

}else{

JOptionPane.showMessageDialog(null,

"Perhaps another time..");

installerService.installFailed();

}

}catch (UnavailableServiceException e){

e.printStackTrace();

}

}

publicstaticvoid main(String[] args){

if ( args[0].equals("install") ){

Installer installer =new Installer();

}else{

/* No need to do anything on uninstall,

but thank the user for their patronage */

JOptionPane.showMessageDialog(null,

"Thank you for using (Trivial) Application!");

}

}

}

[4018 byte] By [AndrewThompson64a] at [2007-11-27 7:09:37]
# 1

I submitted a Bug Report for this, under the title..

installer-desc UNinstaller never called

The basic gist of it is..

Java web start (JWS) offers the installer-desc

element to identify an installer/uninstaller

for an application. The intent of the installer

is to do any application set-up/pull-down that

can not be handled by the standard JWS behaviour

of caching the classes/resources at 1st launch,

and clearing them at uninstall.

The 'install' side of the installer-desc element

seems to work as advertised, but as has been noted

in the web start forum a number of times*, the

installer is never called at time of 'uninstall'.

* Though none reported successful resolution of

the problem, it also seems no one took it through

to a bug report.

http://forum.java.sun.com/thread.jspa?forumID=38&threadID=5124101

(one report)

http://forum.java.sun.com/thread.jspa?threadID=790898

(two relatively recent reports)

http://forum.java.sun.com/thread.jspa?forumID=38&threadID=263691

(1 report from June 2002)

AndrewThompson64a at 2007-7-12 19:01:00 > top of Java-index,Desktop,Deploying...
# 2
> I submitted a Bug Report for this, under the title..> > installer-desc UNinstaller never calledRaised as a bug.. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6568950
AndrewThompson64a at 2007-7-12 19:01:01 > top of Java-index,Desktop,Deploying...