How to make an uninstaller in java
How to make an uninstaller ( for windows ) in java, i know the way how i should delete files, i just want to know how to put the uninstaller in the 'delete programs' section of the configuration screen,
Please do read the question, we do not want answers for software to make an installer, since we have already written our ow开发者_Python百科n program, we are a group of students with an interested spirit, so we wish to write these things ourselves, and don't want some software from someone else.
kind regards jonathan
Please, do not write an installer by yourself. It looks deceptively simple, but isn't.
Either let the user launch your program through Java WebStart (which doesn't look like a Windows system but is acceptable for a central distribution model), or use one of the many existing installers which support Java.
Note: If you target enterprises, choose one that generates MSI. These can be centrally installed silently.
You should not have written your own installer in the first place.
Throw it away, and use a professionally-written installer generator to generate an installer (which will include the uninstaller.)
I recommend Launch4J, or for simpler installations (i.e. no custom install options) Java Web Start may be easier.
Izpack allows the creation of cross-platform installers with optional uninstall (under Add/Remove in MS Windows)
Or you can try non-free Install Anywhere
Java Web Start offers an uninstall facility. It also offers the ExtensionInstallerService
which is intended to perform other set-up/pull-down beyond the standard 'cache or delete classes' (e.g. un/installing a DB).
Here is my demo. of the ExtensionInstallerService
.
BTW - noting your further comments, I agree with the advice not to go that route.
精彩评论