don't allow uninstall when application is running - java application



1 comment

  • Avatar

    If you are bundling your own version of JRE then you can simply check if the java.exe is locked using <fileIsLocked> rule. Such as:

    <conditionRuleList> <fileIsLocked> <path>${installdir}/jre/bin/javaw.exe</path> </fileIsLocked> <conditionRuleList>

    Similarly, it should be possible to check if the JAR file itself is locked - such as by doing:

    <conditionRuleList> <fileIsLocked> <path>${installdir}/myapp.jar</path> </fileIsLocked> <conditionRuleList>

    From my quick checks it seems that running java -jar myapp.jar does cause the myapp.jar to be opened and should be reported as locked by InstallBuilder.

    Comment actions Permalink

Please sign in to leave a comment.