The main class to invoke the getNumSector.

@param args the arguments parsed by commandline
508705
public static void main(String[] args) {
    if (args.length != 2) {
      System.exit(-1);
    }
    String mem = args[0];
    String sector = args[1];
    try {
      getNumSector(mem, sector);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
1255681
public static void main(String[] args) {

        ArrayList<String> tmpArgs = new ArrayList<String>(Arrays.asList(args));
        
        // Get number of threads for multithreading mode
        int numThreads = 1;
        for (int i=0; i<tmpArgs.size()-1; i++) {
        	if (tmpArgs.get(i).equals("-t")) {
        		try {
        			numThreads = Integer.parseInt(tmpArgs.get(i+1));
        			tmpArgs.remove(i+1);
        			tmpArgs.remove(i);
        		} catch (NumberFormatException e) {
        			System.err.println("Invalid number of threads.");
        			System.err.println(e.getStackTrace());
        		}
        	}
        }
        logger.info("Number of threads:{}", numThreads);
        
        args = tmpArgs.toArray(new String[0]);

        StringBuilder cliString = new StringBuilder();
        for (int i = 0; i < args.length; i++) {
            cliString.append(" ").append(args[i]);
        }
        logger.debug("Command line string = {}", cliString.toString());
        System.out.println("Command line string = " + cliString.toString());

        Task task = null;
        try {
            task = (Task) ClassOption.cliStringToObject(cliString.toString(), Task.class, null);
            logger.info("Sucessfully instantiating {}", task.getClass().getCanonicalName());
        } catch (Exception e) {
            logger.error("Fail to initialize the task", e);
            System.out.println("Fail to initialize the task" + e);
            return;
        }
        task.setFactory(new ThreadsComponentFactory());
        task.init();
        
        ThreadsEngine.submitTopology(task.getTopology(), numThreads);
    }
220691
@SuppressWarnings("squid:S1166")
    public static void main(String[] args) throws IOException {
        opts = new Options();

        // Parse the cmdline arguments
        CmdLineParser cli = new CmdLineParser(opts);
        try {
            cli.getProperties().withUsageWidth(80);
            cli.parseArgument(args);
        } catch (@SuppressWarnings("unused") CmdLineException ex) {
            cli.printUsage(System.err);
            System.exit(1);
        }

        Runtime runtime = Runtime.getRuntime();
        int mb = 1024 * 1024;
        out(1, "Total Memory: %d%n", runtime.totalMemory() / mb);
        out(1, "Max Memory: %d%n", runtime.maxMemory() / mb);

        Parameters ps = opts.parameters();

        Iterator<LabelledInstance> ite = opts.instances().iterator();
        while (ite.hasNext()) {
            LabelledInstance i = ite.next();
            solve(i, ps);
        }
    }
342677
@SuppressWarnings("unchecked")
	public static void main(String[] args)
	{
		List<File> filenames = new Vector<File>();
		List<File> pathnames = new Vector<File>();
		List<String> largs = Arrays.asList(args);
		VDMJ controller = null;
		Dialect dialect = Dialect.VDM_SL;
		String remoteName = null;
		Class<RemoteControl> remoteClass = null;
		String defaultName = null;

		Properties.init(); // Read properties file, if any
		Settings.usingCmdLine = true;
		
		if(largs.contains("-version"))
		{
			println(getOvertureVersion());
			System.exit(0);
		}
		
		for (Iterator<String> i = largs.iterator(); i.hasNext();)
		{
			String arg = i.next();

			if (arg.equals("-vdmsl"))
			{
				controller = new VDMSL();
				dialect = Dialect.VDM_SL;
			} else if (arg.equals("-vdmpp"))
			{
				controller = new VDMPP();
				dialect = Dialect.VDM_PP;
			} else if (arg.equals("-vdmrt"))
			{
				controller = new VDMRT();
				dialect = Dialect.VDM_RT;
			} else if (arg.equals("-w"))
			{
				warnings = false;
			} else if (arg.equals("-i"))
			{
				interpret = true;
			} else if (arg.equals("-p"))
			{
				pog = true;
			} else if (arg.equals("-q"))
			{
				quiet = true;
			} else if (arg.equals("-e"))
			{
				Settings.usingCmdLine = false;
				interpret = true;
				pog = false;

				if (i.hasNext())
				{
					script = i.next();
				} else
				{
					usage("-e option requires an expression");
				}
			} else if (arg.equals("-o"))
			{
				if (i.hasNext())
				{
					if (outfile != null)
					{
						usage("Only one -o option allowed");
					}

					outfile = i.next();
				} else
				{
					usage("-o option requires a filename");
				}
			} else if (arg.equals("-c"))
			{
				if (i.hasNext())
				{
					filecharset = validateCharset(i.next());
				} else
				{
					usage("-c option requires a charset name");
				}
			} else if (arg.equals("-t"))
			{
				if (i.hasNext())
				{
					Console.setCharset(validateCharset(i.next()));
				} else
				{
					usage("-t option requires a charset name");
				}
			} else if (arg.equals("-r"))
			{
				if (i.hasNext())
				{
					Settings.release = Release.lookup(i.next());

					if (Settings.release == null)
					{
						usage("-r option must be " + Release.list());
					}
				} else
				{
					usage("-r option requires a VDM release");
				}
			} else if (arg.equals("-pre"))
			{
				Settings.prechecks = false;
			} else if (arg.equals("-post"))
			{
				Settings.postchecks = false;
			} else if (arg.equals("-inv"))
			{
				Settings.invchecks = false;
			} else if (arg.equals("-dtc"))
			{
				// NB. Turn off both when no DTC
				Settings.invchecks = false;
				Settings.dynamictypechecks = false;
			} else if (arg.equals("-measures"))
			{
				Settings.measureChecks = false;
			} else if (arg.equals("-log"))
			{
				if (i.hasNext())
				{
					logfile = i.next();
				} else
				{
					usage("-log option requires a filename");
				}
			} else if (arg.equals("-remote"))
			{
				if (i.hasNext())
				{
					interpret = true;
					remoteName = i.next();
				} else
				{
					usage("-remote option requires a Java classname");
				}
			} else if (arg.equals("-default"))
			{
				if (i.hasNext())
				{
					defaultName = i.next();
				} else
				{
					usage("-default option requires a name");
				}
			} else if (arg.equals("-path"))
			{
				if (i.hasNext())
				{
					File path = new File(i.next());

					if (path.isDirectory())
					{
						pathnames.add(path);
					} else
					{
						usage(path + " is not a directory");
					}
				} else
				{
					usage("-path option requires a directory");
				}
			}else if (arg.equals("-baseDir"))
			{
				if (i.hasNext())
				{
					try
					{
						Settings.baseDir = new File(i.next());
					} catch (IllegalArgumentException e)
					{
						usage(e.getMessage() + ": " + arg);
					}
				} else
				{
					usage("-baseDir option requires a folder name");
				}
			}  else if (arg.startsWith("-"))
			{
				usage("Unknown option " + arg);
			} else
			{
				// It's a file or a directory
				File file = new File(arg);

				if (file.isDirectory())
				{
					for (File subFile : file.listFiles(dialect.getFilter()))
					{
						if (subFile.isFile())
						{
							filenames.add(subFile);
						}
					}
				} else
				{
					if (file.exists())
					{
						filenames.add(file);
					} else
					{
						boolean OK = false;

						for (File path : pathnames)
						{
							File pfile = new File(path, arg);

							if (pfile.exists())
							{
								filenames.add(pfile);
								OK = true;
								break;
							}
						}

						if (!OK)
						{
							usage("Cannot find file " + file);
						}

					}
				}
			}
		}

		if (controller == null)
		{
			usage("You must specify either -vdmsl, -vdmpp or -vdmrt");
		}

		if (logfile != null && !(controller instanceof VDMRT))
		{
			usage("The -log option can only be used with -vdmrt");
		}

		if (remoteName != null)
		{
			try
			{
				Class<?> cls = ClassLoader.getSystemClassLoader().loadClass(remoteName);
				remoteClass = (Class<RemoteControl>) cls;
			} catch (ClassNotFoundException e)
			{
				usage("Cannot locate " + remoteName + " on the CLASSPATH");
			}
		}

		ExitStatus status = null;

		if (filenames.isEmpty() && (!interpret || remoteClass != null))
		{
			usage("You didn't specify any files");
			status = ExitStatus.EXIT_ERRORS;
		} else
		{
			do
			{
				if (filenames.isEmpty())
				{
					status = controller.interpret(filenames, null);
				} else
				{
					status = controller.parse(filenames);

					if (status == ExitStatus.EXIT_OK)
					{
						status = controller.typeCheck();

						if (status == ExitStatus.EXIT_OK && interpret)
						{
							if (remoteClass == null)
							{
								status = controller.interpret(filenames, defaultName);
							} else
							{
								try
								{
									final RemoteControl remote = remoteClass.newInstance();
									Interpreter i = controller.getInterpreter();

									if (defaultName != null)
									{
										i.setDefaultName(defaultName);
									}

									i.init(null);

									try
									{
										// remote.run(new RemoteInterpreter(i, null));
										final RemoteInterpreter remoteInterpreter = new RemoteInterpreter(i, null);
										Thread remoteThread = new Thread(new Runnable()
										{

											public void run()
											{
												try
												{
													remote.run(remoteInterpreter);
												} catch (Exception e)
												{
													println(e.getMessage());
													// status = ExitStatus.EXIT_ERRORS;
												}
											}
										});
										remoteThread.setName("RemoteControl runner");
										remoteThread.setDaemon(true);
										remoteThread.start();
										remoteInterpreter.processRemoteCalls();
										status = ExitStatus.EXIT_OK;
									} catch (Exception e)
									{
										println(e.getMessage());
										status = ExitStatus.EXIT_ERRORS;
									}
								} catch (InstantiationException e)
								{
									usage("Cannot instantiate " + remoteName);
								} catch (Exception e)
								{
									usage(e.getMessage());
								}
							}
						}
					}
				}
			} while (status == ExitStatus.RELOAD);
		}

		if (interpret)
		{
			infoln("Bye");
		}

		System.exit(status == ExitStatus.EXIT_OK ? 0 : 1);
	}
1208796
static public void main (String[] args) throws Exception {
		if (args.length == 0) {
			String commandLine = "-f 0 -wi 1 -i 1 -t 1 -w 1s -r 1s " // For developement only (fork 0, short runs).
			// + "-bs 2500000 ArrayBenchmark" //
			// + "-rf csv FieldSerializerBenchmark.field FieldSerializerBenchmark.tagged" //
			// + "FieldSerializerBenchmark.tagged" //
			;
			System.out.println(commandLine);
			args = commandLine.split(" ");
		}
		Main.main(args);
	}
108715
public static void main(final String[] args) {
        Switch about = new Switch("a", "about", "display about message");
        Switch help = new Switch("h", "help", "display help message");
        FileArgument referenceFastaFile = new FileArgument("r", "reference", "input reference FASTA file", true);
        FileArgument scaffoldsFastaFile = new FileArgument("s", "scaffolds", "input scaffolds FASTA file", true);
        FileArgument evalFile = new FileArgument("e", "eval", "output eval file, default stdout", false);

        ArgumentList arguments = new ArgumentList(about, help, referenceFastaFile, scaffoldsFastaFile, evalFile);
        CommandLine commandLine = new CommandLine(args);

        EvaluateScaffolds evaluateScaffolds = null;
        try {
            CommandLineParser.parse(commandLine, arguments);
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            evaluateScaffolds = new EvaluateScaffolds(referenceFastaFile.getValue(), scaffoldsFastaFile.getValue(), evalFile.getValue());
        }
        catch (CommandLineParseException e) {
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            Usage.usage(USAGE, e, commandLine, arguments, System.err);
            System.exit(-1);
        }
        try {
            System.exit(evaluateScaffolds.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
42799
public static void main(final String[] args)
      throws IOException, JDOMException {
    CLI cmdLine = new CLI();
    cmdLine.parseCLI(args);
  }
316853
public static void main(String... args) {
        CommandLineRunner runner = new CommandLineRunner();

        try {
            runner.run(args);
        } catch (Exception t) {
            System.err.println(t.getMessage());
            System.err.println("Try '--help' for more information.");

            t.printStackTrace(System.err);

            System.exit(1);
        }

        System.exit(0);
    }
873255
public static void main(String[] args) {
        LogViewer logViewer = new LogViewer();
        int code = logViewer.execute(args);
        if (code > 0) {
            System.err.println(getLocalizedString("CWTRA0029I"));
        }
        System.exit(code);
    }
152866
public void run(String[] args) {
    // Add and parse options.
    OptionParser parser = new OptionParser();
    initializeCommonOptions(parser);
    initializeOptions(parser);

    String errorMessage = null;
    try {
      parsedOptions = parser.parse(args);
    } catch (OptionException e) {
      errorMessage = e.getMessage();
    }

    boolean printHelp = false;
    if (errorMessage != null) {
      // If an error occurs, the options don't parse.
      // Therefore, we must manually check if the help option was
      // given.
      for (int i = 0; i < args.length; i++) {
        if (args[i].equals("--help")) {
          printHelp = true;
        }
      }
    }

    if (errorMessage != null && !printHelp) {
      System.err.println(errorMessage);
      System.err.println("Try --help for more information about options.");
      System.exit(1);
    }

    if (printHelp || parsedOptions.has(helpOpt)) {
      // If a help option is given, print help then quit.
      try {
        parser.printHelpOn(System.err);
      } catch (IOException ioException) {
        throw new RuntimeException(ioException);
      }
      System.exit(0);
    }

    // Log any passed-in options.
    if (!parsedOptions.has(noPrintOptions)) {
      System.out.println("Command-line options:");
      for (OptionSpec<?> optionSpec : parsedOptions.specs()) {
        if (parsedOptions.hasArgument(optionSpec)) {
          System.out.println("--" + Iterables.getFirst(optionSpec.options(), "") + " "
              + Joiner.on(" ").join(parsedOptions.valuesOf(optionSpec)));
        } else {
          System.out.println("--" + Iterables.getFirst(optionSpec.options(), ""));
        }
      }
      System.out.println("");
    }

    // Run the program.
    long startTime = System.currentTimeMillis();
    processOptions(parsedOptions);
    run(parsedOptions);
    long endTime = System.currentTimeMillis();

    if (!parsedOptions.has(noPrintOptions)) {
      System.out.println("Total time elapsed: " + TimeUtils.durationToString(endTime - startTime));
    }

    System.exit(0);
  }
350045
public static void main(String[] arg) {

        System.getProperties().put("sun.java2d.noddraw", "true");

        // (ulrivo): read all arguments from the command line
        String  lowerArg;
        String  urlid        = null;
        String  rcFile       = null;
        boolean autoConnect  = false;
        boolean urlidConnect = false;

        bMustExit = true;

        for (int i = 0; i < arg.length; i++) {
            lowerArg = arg[i].toLowerCase();

            if (lowerArg.startsWith("--")) {
                lowerArg = lowerArg.substring(1);
            }

            i++;

            if (i == arg.length) {
                showUsage();

                return;
            }

            if (lowerArg.equals("-driver")) {
                defDriver   = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-url")) {
                defURL      = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-user")) {
                defUser     = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-password")) {
                defPassword = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-urlid")) {
                urlid        = arg[i];
                urlidConnect = true;
            } else if (lowerArg.equals("-rcfile")) {
                rcFile       = arg[i];
                urlidConnect = true;
            } else if (lowerArg.equals("-dir")) {
                defDirectory = arg[i];
            } else if (lowerArg.equals("-script")) {
                defScript = arg[i];
            } else if (lowerArg.equals("-noexit")) {
                bMustExit = false;

                i--;
            } else if (lowerArg.equals("-help")) {
                showUsage();

                return;
            } else {
                /* Syntax ERRORS should either throw or exit with non-0 status.
                 * In our case, it may be unsafe to exit, so we throw.
                 * (I.e. should provide easy way for caller to programmatically
                 * determine that there was an invocation problem).
                 */
                throw new IllegalArgumentException(
                    "Try:  java... " + DatabaseManagerSwing.class.getName()
                    + " --help");

                // No reason to localize, since the main syntax message is
                // not localized.
            }
        }

        DatabaseManager m = new DatabaseManager();

        m.main();

        Connection c = null;

        try {
            if (autoConnect && urlidConnect) {
                throw new IllegalArgumentException(
                    "You may not specify both (urlid) AND (url/user/password).");
            }

            if (autoConnect) {
                c = ConnectionDialog.createConnection(defDriver, defURL,
                                                      defUser, defPassword);
            } else if (urlidConnect) {
                if (urlid == null) {
                    throw new IllegalArgumentException(
                        "You must specify an 'urlid' to use an RC file");
                }

                autoConnect = true;

                if (rcFile == null) {
                    rcFile = DEFAULT_RCFILE;
                }

                c = new RCData(new File(rcFile), urlid).getConnection(null,
                               System.getProperty("sqlfile.charset"),
                               System.getProperty("javax.net.ssl.trustStore"));
            } else {
                c = ConnectionDialog.createConnection(m.fMain, "Connect");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

        if (c == null) {
            return;
        }

        m.connect(c);
    }
426586
public static void main(String args[])
    {
        System.setProperty("voltdb_no_logging", "true");
        int exitCode = mainWithReturnCode(args);
        System.exit(exitCode);
    }
108893
public static void main(String[] args) {
        DEBUG_MODE_V = DebugMode.SCREEN;
        Log.initScreen();
        printVerbose(null, null);
    }
356524
public static void main(String[] args) {
		if (args.length > 0) {
			System.out.printf("%s\n", getFullVersion());
		} else {
			System.out.println(VERSION);
		}
	}
632665
public static void main(String[] args) {

        JLAN_DISABLED = true;
        boolean wrongUsage = false;
        String webInfPath = null;
        String script = null;
        String servletMapping = null;
        String defaultWebApp = null;
        String additional = null;
        int errorCode = -1;
        if (args.length > 4) {
            wrongUsage = true;
        } else {
            for (int i = 0; i < args.length; i++) {
                String arg = args[i];
                if (arg.startsWith(SHELL_PARAM_BASE)) {
                    webInfPath = arg.substring(SHELL_PARAM_BASE.length());
                } else if (arg.startsWith(SHELL_PARAM_SCRIPT)) {
                    script = arg.substring(SHELL_PARAM_SCRIPT.length());
                } else if (arg.startsWith(SHELL_PARAM_SERVLET_MAPPING)) {
                    servletMapping = arg.substring(SHELL_PARAM_SERVLET_MAPPING.length());
                } else if (arg.startsWith(SHELL_PARAM_DEFAULT_WEB_APP)) {
                    defaultWebApp = arg.substring(SHELL_PARAM_DEFAULT_WEB_APP.length());
                } else if (arg.startsWith(SHELL_PARAM_ADDITIONAL_COMMANDS)) {
                    additional = arg.substring(SHELL_PARAM_ADDITIONAL_COMMANDS.length());
                } else if (arg.startsWith(SHELL_PARAM_ERROR_CODE)) {
                    errorCode = Integer.valueOf(arg.substring(SHELL_PARAM_ERROR_CODE.length())).intValue();
                } else if (arg.startsWith(SHELL_PARAM_JLAN)) {
                    JLAN_DISABLED = false;
                } else {
                    System.out.println(Messages.get().getBundle().key(Messages.GUI_SHELL_WRONG_USAGE_0));
                    wrongUsage = true;
                }
            }
        }
        if (wrongUsage) {
            System.out.println(Messages.get().getBundle().key(Messages.GUI_SHELL_USAGE_1, CmsShell.class.getName()));
        } else {

            I_CmsShellCommands additionalCommands = null;
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(additional)) {
                try {
                    Class<?> commandClass = Class.forName(additional);
                    additionalCommands = (I_CmsShellCommands)commandClass.newInstance();
                } catch (Exception e) {
                    System.out.println(
                        Messages.get().getBundle().key(Messages.GUI_SHELL_ERR_ADDITIONAL_COMMANDS_1, additional));
                    e.printStackTrace();
                    return;
                }
            }
            boolean interactive = true;
            FileInputStream stream = null;
            if (script != null) {
                try {
                    stream = new FileInputStream(script);
                } catch (IOException exc) {
                    System.out.println(Messages.get().getBundle().key(Messages.GUI_SHELL_ERR_SCRIPTFILE_1, script));
                }
            }
            if (stream == null) {
                // no script-file, use standard input stream
                stream = new FileInputStream(FileDescriptor.in);
                interactive = true;
            }
            CmsShell shell = new CmsShell(
                webInfPath,
                servletMapping,
                defaultWebApp,
                "${user}@${project}:${siteroot}|${uri}>",
                additionalCommands,
                System.out,
                System.err,
                interactive);
            shell.m_errorCode = errorCode;
            shell.execute(stream);
            try {
                stream.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
193347
public static void main(String[] args) {
		JKLogger logger = JKLoggerFactory.getLogger(Integer.class);
		logger.info("asdfads");
	}
762806
public static void main(String[] arg) {

        System.getProperties().put("sun.java2d.noddraw", "true");

        // (ulrivo): read all arguments from the command line
        String  lowerArg;
        String  urlid        = null;
        String  rcFile       = null;
        boolean autoConnect  = false;
        boolean urlidConnect = false;

        bMustExit = true;

        for (int i = 0; i < arg.length; i++) {
            lowerArg = arg[i].toLowerCase();

            if (lowerArg.startsWith("--")) {
                lowerArg = lowerArg.substring(1);
            }

            i++;

            if (lowerArg.equals("-driver")) {
                defDriver   = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-url")) {
                defURL      = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-user")) {
                defUser     = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-password")) {
                defPassword = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-urlid")) {
                urlid        = arg[i];
                urlidConnect = true;
            } else if (lowerArg.equals("-rcfile")) {
                rcFile       = arg[i];
                urlidConnect = true;
            } else if (lowerArg.equals("-dir")) {
                defDirectory = arg[i];
            } else if (lowerArg.equals("-script")) {
                defScript = arg[i];
            } else if (lowerArg.equals("-noexit")) {
                bMustExit = false;

                i--;
            } else if (lowerArg.equals("-help")) {
                showUsage();
                return;
            } else {
                /* Syntax ERRORS should either throw or exit with non-0 status.
                 * In our case, it may be unsafe to exit, so we throw.
                 * (I.e. should provide easy way for caller to programmatically
                 * determine that there was an invocation problem).
                 */

                throw new IllegalArgumentException(
                        "Try:  java... " + DatabaseManagerSwing.class.getName()
                        + " --help");
                // No reason to localize, since the main syntax message is
                // not localized.
            }
        }

        DatabaseManagerSwing m =
            new DatabaseManagerSwing(new JFrame("HSQL Database Manager"));

        // Added: (weconsultants@users): Need databaseManagerSwing for later Reference
        refForFontDialogSwing = m;

        m.main();

        Connection c = null;

        m.setWaiting("Initializing");

        try {
            if (autoConnect && urlidConnect) {
                throw new IllegalArgumentException(
                    "You may not specify both (urlid) AND (url/user/password).");
            }

            if (autoConnect) {
                c = ConnectionDialogSwing.createConnection(defDriver, defURL,
                        defUser, defPassword);
            } else if (urlidConnect) {
                if (urlid == null) {
                    throw new IllegalArgumentException(
                        "You must specify an 'urlid' to use an RC file");
                }

                autoConnect = true;

                String rcfilepath = (rcFile == null) ? DEFAULT_RCFILE
                                                     : rcFile;
                RCData rcdata     = new RCData(new File(rcfilepath), urlid);

                c = rcdata.getConnection(
                    null, System.getProperty("sqlfile.charset"),
                    System.getProperty("javax.net.ssl.trustStore"));
            } else {
                c = ConnectionDialogSwing.createConnection(m.jframe,
                        "Connect");
            }
        } catch (Exception e) {

            //  Added: (weconsultants@users)
            CommonSwing.errorMessage(e);
        } finally {
            m.setWaiting(null);
        }

        if (c != null) {
            m.connect(c);
        }

        // Added: (weconsultants@users): For preloadng FontDialogSwing
        FontDialogSwing.creatFontDialog(refForFontDialogSwing);
        m.start();
    }