Is there a java utility that can be used by an application to uninstall itself and exit? I currently only use the executable jar to test this feature on a windows platform; there is no and there may never be a fancy installation mechanism other than providing the jar file(s).

```
File MYAPP = new File(".\\myapp.jar");
MYAPP.deleteOnExit();
System.exit(0);

```

only works (deletes myapp.jar) some of the time. In the Android environment all that is needed is:

```
Uri packageURI = Uri.parse("package:com.co.app");
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);      
startActivity(uninstallIntent);

```

I was hoping the desktop environment had something similar.