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

Answered

Comments

1 comment

  • Avatar
    wojciechka

    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.

    0
    Comment actions Permalink

Please sign in to leave a comment.