MCPcopy Create free account
hub / github.com/PCGen/pcgen / main

Method main

code/src/java/pcgen/system/Main.java:104–143  ·  view source on GitHub ↗

@param args the command line arguments

(String... args)

Source from the content-addressed store, hash-verified

102 * @param args the command line arguments
103 */
104 public static void main(String... args)
105 {
106 Logging.log(Level.INFO, "Starting PCGen v" + PCGenPropBundle.getVersionNumber() //$NON-NLS-1$
107 + PCGenPropBundle.getAutobuildString());
108
109 Thread.setDefaultUncaughtExceptionHandler(new LoggingUncaughtExceptionHandler());
110 DeadlockDetectorTask deadlockDetectorTask = new DeadlockDetectorTask(new PCGenLoggingDeadlockHandler());
111 deadlockDetectorTask.initialize();
112
113 logSystemProps();
114
115 commandLineArguments = parseCommands(args);
116
117 configFactory = new PropertyContextFactory(getConfigPath());
118 if (commandLineArguments.getConfigFileName().isPresent())
119 {
120 configFactory.registerAndLoadPropertyContext(
121 ConfigurationSettings.getInstance(commandLineArguments.getConfigFileName().get()));
122 }
123 else
124 {
125 configFactory.registerAndLoadPropertyContext(ConfigurationSettings.getInstance());
126 }
127
128 if (commandLineArguments.isStartNameGenerator())
129 {
130 Component dialog = new RandomNameDialog(null, null);
131 dialog.setVisible(true);
132 GracefulExit.exit(0);
133 }
134
135 if (commandLineArguments.getExportSheet().isEmpty())
136 {
137 startupWithGUI();
138 }
139 else
140 {
141 shutdown(startupWithoutGUI());
142 }
143 }
144
145 private static String getConfigPath()
146 {

Callers 2

runTestMethod · 0.95

Calls 15

logMethod · 0.95
getVersionNumberMethod · 0.95
getAutobuildStringMethod · 0.95
initializeMethod · 0.95
logSystemPropsMethod · 0.95
parseCommandsMethod · 0.95
getConfigPathMethod · 0.95
getInstanceMethod · 0.95
exitMethod · 0.95
startupWithGUIMethod · 0.95
shutdownMethod · 0.95
startupWithoutGUIMethod · 0.95

Tested by 2

runTestMethod · 0.76