use of org.kse.gui.CreateApplicationGui in project keystore-explorer by kaikramer.
the class KSE method main.
/**
* Start the KeyStore Explorer application. Takes one optional argument -
* the location of a KeyStore file to open upon startup.
*
* @param args
* the command line arguments
*/
public static void main(String[] args) {
try {
// To take affect these must be set before the splash screen is instantiated
if (OperatingSystem.isMacOs()) {
setAppleSystemProperties();
} else if (OperatingSystem.isWindows7() || OperatingSystem.isWindows8() || OperatingSystem.isWindows10()) {
String appId = props.getString("KSE.AppUserModelId");
Shell32 shell32 = (Shell32) Native.loadLibrary("shell32", Shell32.class);
shell32.SetCurrentProcessExplicitAppUserModelID(new WString(appId)).longValue();
} else if (OperatingSystem.isLinux()) {
fixAppClassName();
}
setInstallDirProperty();
SplashScreen splash = SplashScreen.getSplashScreen();
updateSplashMessage(splash, res.getString("KSE.LoadingApplicationSettings.splash.message"));
ApplicationSettings applicationSettings = ApplicationSettings.getInstance();
setCurrentDirectory(applicationSettings);
updateSplashMessage(splash, res.getString("KSE.InitializingSecurity.splash.message"));
initialiseSecurity();
// list of files to open after start
List<File> parameterFiles = new ArrayList<File>();
for (String arg : args) {
File parameterFile = new File(arg);
if (parameterFile.exists()) {
parameterFiles.add(parameterFile);
}
}
// Create application GUI on the event handler thread
updateSplashMessage(splash, res.getString("KSE.CreatingApplicationGui.splash.message"));
SwingUtilities.invokeLater(new CreateApplicationGui(applicationSettings, splash, parameterFiles));
} catch (Throwable t) {
DError dError = new DError(new JFrame(), t);
dError.setLocationRelativeTo(null);
dError.setVisible(true);
System.exit(1);
}
}
Aggregations