Details

    • Type: Sub-task Sub-task
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.2.1
    • Fix Version/s: 4.3.1
    • Component/s: Documentation
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      The FAQ documents how to get console and debug output from an installer (http://docs.codehaus.org/display/IZPACK/FAQ+-+Frequently+asked+questions#FAQ-Frequentlyaskedquestions-DebugOutput ). But it's not so easy to get console output from an uninstaller, at least under Windows.

      When the uninstaller is called using

      java -jar -DTRACE=TRUE uninstaller.jar

      console output is not visible.

      The uninstaller uses the SelfModifier class to start a new java VM and the console output of the second VM is not visible.

      One possible solution is to write a class that starts the uninstaller code by bypassing SelfModifier:

      import com.izforge.izpack.uninstaller.Uninstaller;

      public class IzPackUninstallerStarter {

      public static void main (String args[])

      { Uninstaller.uninstall (args); }

      }

      1. IZPACK-331.patch
        2 kB
        Christian d'Heureuse
      2. IzPackUninstallerStarter.java
        0.2 kB
        Christian d'Heureuse

        Activity

        Hide
        Julien Ponge added a comment -

        Would you have a piece of documentation for this?

        Show
        Julien Ponge added a comment - Would you have a piece of documentation for this?
        Hide
        Christian d'Heureuse added a comment -

        Added a sample class that can be used to start an uninstaller so that console output is visible. (Console output is otherwise not visible on Windows). It bypasses the SelfModifier class.

        When the class is included in the uninstaller JAR, the following command can be used:

        java -cp uninstaller.jar IzPackUninstallerStarter

        Show
        Christian d'Heureuse added a comment - Added a sample class that can be used to start an uninstaller so that console output is visible. (Console output is otherwise not visible on Windows). It bypasses the SelfModifier class. When the class is included in the uninstaller JAR, the following command can be used: java -cp uninstaller.jar IzPackUninstallerStarter
        Hide
        Julien Ponge added a comment -

        I have updated the FAQ with a link to this issue as it fits better here.

        Show
        Julien Ponge added a comment - I have updated the FAQ with a link to this issue as it fits better here.
        Hide
        Christian d'Heureuse added a comment -

        Added a patch to implement a "-d" (direct) option switch for Uninstaller.java.

        This would make it easier to get console output from the uninstaller.

        With this patch, the uninstaller can be called as:

        java -jar uninstaller.jar -d

        Show
        Christian d'Heureuse added a comment - Added a patch to implement a "-d" (direct) option switch for Uninstaller.java. This would make it easier to get console output from the uninstaller. With this patch, the uninstaller can be called as: java -jar uninstaller.jar -d
        Hide
        Julien Ponge added a comment -

        Marked as iixed as Christian has updated the issue.

        Show
        Julien Ponge added a comment - Marked as iixed as Christian has updated the issue.

          People

          • Assignee:
            Julien Ponge
            Reporter:
            Christian d'Heureuse
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: