Fix for issue 2318.
In some cases calling UIManager seems to make the JVM to exit (for instance if it cannot ge the display in some special scenarios). The fix consists of not calling the UIManager code if we are in CLI mode.
| | |
| | | package org.opends.quicksetup.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | |
| | | new HashMap<IconType, ImageIcon>(); |
| | | |
| | | static { |
| | | if (!Utils.isCli()) |
| | | { |
| | | try |
| | | { |
| | | UIManager.put("OptionPane.background", |
| | |
| | | LOG.log(Level.WARNING, "Error updating UIManager: "+t, t); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * The following enumeration contains the different icons that we can have. |