Skip to content

Commit

Permalink
IZPACK-654: The installer should simply switch to console mode when a…
Browse files Browse the repository at this point in the history
… headless env is detected, even if the user has not passed the -console cmd
  • Loading branch information
markrmiller committed Mar 15, 2011
1 parent d8ff1dc commit 02fe9a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/com/izforge/izpack/installer/Installer.java
Expand Up @@ -21,6 +21,7 @@

package com.izforge.izpack.installer;

import java.awt.GraphicsEnvironment;
import java.util.Arrays;
import java.util.Date;
import java.util.Iterator;
Expand Down Expand Up @@ -101,6 +102,11 @@ else if ("-language".equalsIgnoreCase(arg))
}
}

// if headless, just use the console mode
if (type == INSTALLER_GUI && GraphicsEnvironment.isHeadless()) {
type = INSTALLER_CONSOLE;
}

switch (type)
{
case INSTALLER_GUI:
Expand Down

0 comments on commit 02fe9a3

Please sign in to comment.