java.lang.Objectcom.install4j.api.Util
public class Util
The class contains various utility functions to be used by custom actions and custom screens.
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
static void |
fatalError(java.lang.Throwable t)
This method can be invoked if you encounter a non-recoverable and non-expected error in your custom code. |
static java.lang.String |
getInstallerLanguage()
Return the language of the installer. |
static java.awt.Window |
getParentWindow()
Get the window of the installer. |
static java.lang.String |
getStandardApplicationsDirectory()
Returns the standard directory for installing applications. |
static boolean |
isHpux()
Returns whether the platform is HP UX. |
static boolean |
isLinux()
Returns whether the platform is Linux. |
static boolean |
isMacOS()
Returns whether the platform is Mac OS X. |
static boolean |
isSolaris()
Returns whether the platform is Solaris. |
static boolean |
isWindows()
Returns whether the platform is Windows. |
static boolean |
isWindows9X()
Returns whether the platform is Windows 9X (95, 98, ME). |
static boolean |
isWindowsNT()
Returns whether the platform is Windows NT (not Windows 2000 and XP). |
static void |
showMessage(java.lang.String message,
int messageType)
Show a message dialog. |
static int |
showOptionDialog(java.lang.String message,
java.lang.String[] options,
int messageType)
Show an options dialog. |
static void |
showUrl(java.net.URL url)
Show a URL in the default browser. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static java.lang.String getInstallerLanguage()
public static boolean isSolaris()
public static boolean isLinux()
public static boolean isWindows()
public static boolean isWindows9X()
public static boolean isWindowsNT()
public static boolean isMacOS()
public static boolean isHpux()
public static java.lang.String getStandardApplicationsDirectory()
public static void showUrl(java.net.URL url)
For quiet installers, this method does nothing.
url - the URL to be shown in the browser.
public static void showMessage(java.lang.String message,
int messageType)
message - the messagemessageType - the message type (see JOptionPane)JOptionPane
public static int showOptionDialog(java.lang.String message,
java.lang.String[] options,
int messageType)
message - the messageoptions - the optionsmessageType - the message type (see JOptionPane)
JOptionPanepublic static void fatalError(java.lang.Throwable t)
t - the exception that ocurredpublic static java.awt.Window getParentWindow()