diff --git a/src/com/webcodepro/applecommander/ui/AppleCommander.java b/src/com/webcodepro/applecommander/ui/AppleCommander.java index bbb0bb7..ecef1df 100644 --- a/src/com/webcodepro/applecommander/ui/AppleCommander.java +++ b/src/com/webcodepro/applecommander/ui/AppleCommander.java @@ -58,10 +58,17 @@ public class AppleCommander { String[] extraArgs = new String[args.length - 1]; System.arraycopy(args, 1, extraArgs, 0, extraArgs.length); if ("-swt".equalsIgnoreCase(args[0])) { //$NON-NLS-1$ - launchSwtAppleCommander(args); + if (isSwtAvailable()) { + launchSwtAppleCommander(args); + } else { + System.err.println(textBundle.get("SwtVersionNotAvailable")); //$NON-NLS-1$ + } } else if ("-swing".equalsIgnoreCase(args[0])) { //$NON-NLS-1$ - System.err.println(textBundle.get("SwingVersionNotAvailable")); //$NON-NLS-1$ - launchSwingAppleCommander(args); + if (isSwingAvailable()) { + launchSwingAppleCommander(args); + } else { + System.err.println(textBundle.get("SwingVersionNotAvailable")); //$NON-NLS-1$ + } } else if ("-command".equalsIgnoreCase(args[0])) { //$NON-NLS-1$ System.err.println(textBundle.get("CommandLineNotAvailable")); //$NON-NLS-1$ } else if ("-help".equalsIgnoreCase(args[0]) //$NON-NLS-1$ diff --git a/src/com/webcodepro/applecommander/ui/UiBundle.properties b/src/com/webcodepro/applecommander/ui/UiBundle.properties index 200dea6..5742885 100644 --- a/src/com/webcodepro/applecommander/ui/UiBundle.properties +++ b/src/com/webcodepro/applecommander/ui/UiBundle.properties @@ -110,6 +110,7 @@ CommandLineDC42Bad = Unable to interpret this DiskCopy 42 image. UserPreferencesComment = AppleCommander user preferences # AppleCommander +SwtVersionNotAvailable = Sorry, the SWT GUI is not available. SwingVersionNotAvailable = Sorry, the Swing GUI is not available. CommandLineNotAvailable = Sorry, the command line user interface is not available. AppleCommanderHelp = AppleCommander general options:\n-swt will launch the SWT version of AppleCommander.\n This requires the SWT jar and dll files to be present.\n-swing will launch the Swing version of AppleCommander.\n (This is not implemented yet.)\n-command will enter command interpreter mode. (This is also\n not implemented yet.)\n-help will show this help text.