Is there a java utility that can be used by an application to erase itself (the app.jar file) and exit? I currently use the executable jar to test this feature on a windows platform. There is no fancy installation mechanism (and there may never be one) other than providing the jar file(s). The following does not deletes myapp.jar.

Java Code:
File MYAPP = new File(".\\myapp.jar"); 
MYAPP.deleteOnExit(); 
System.exit(0);
In the Android environment all that is needed is:

Java Code:
Uri packageURI = Uri.parse("package:com.co.app"); 
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);       
startActivity(uninstallIntent);
I hope the desktop environment has something similar.