public static void main(String[] args) {

        try {
            //
            // Initialize the application variables
            //
            fileSeparator = System.getProperty("file.separator");
            lineSeparator = System.getProperty("line.separator");
            dataPath = System.getProperty("user.home")+fileSeparator+"Documents"+fileSeparator+"My Money";
            propFile = new File(dataPath+fileSeparator+"MyMoney.properties");
            properties = new Properties();
            AccountRecord.accounts = new TreeSet<>();
            CategoryRecord.categories = new TreeSet<>();
            SecurityRecord.securities = new TreeSet<>();
            TransactionRecord.transactions = new LinkedList<>();
            ScheduleRecord.transactions = new LinkedList<>();
            //
            // Get the application build properties
            //
            Class<?> mainClass = Class.forName("org.ScripterRon.MyMoney.Main");
            try (InputStream classStream = mainClass.getClassLoader().getResourceAsStream("META-INF/application.properties")) {
                if (classStream == null)
                    throw new IOException("Application build properties not found");
                Properties applicationProperties = new Properties();
                applicationProperties.load(classStream);
                applicationID = applicationProperties.getProperty("application.id");
                applicationName = applicationProperties.getProperty("application.name");
                applicationVersion = applicationProperties.getProperty("application.version");
            }
            //
            // Create the data directory if it doesn't exist
            //
            File dirFile = new File(Main.dataPath);
            if (!dirFile.exists())
                dirFile.mkdir();
            //
            // Load the saved application properties
            //
            if (Main.propFile.exists()) {
                try (FileInputStream in = new FileInputStream(Main.propFile)) {
                    Main.properties.load(in);
                }
            }
            //
            // Open the application lock file
            //
            lockFile = new RandomAccessFile(dataPath+fileSeparator+".lock", "rw");
            fileLock = lockFile.getChannel().tryLock();
            if (fileLock == null) {
                JOptionPane.showMessageDialog(null, "MyMoney is already running", "Error", JOptionPane.ERROR_MESSAGE);
                System.exit(1);
            }
            //
            // Save the system properties for debug purposes
            //
            Main.properties.setProperty("java.version", System.getProperty("java.version"));
            Main.properties.setProperty("java.home", System.getProperty("java.home"));
            Main.properties.setProperty("os.name", System.getProperty("os.name"));
            Main.properties.setProperty("sun.os.patch.level", System.getProperty("sun.os.patch.level"));
            Main.properties.setProperty("user.name", System.getProperty("user.name"));
            Main.properties.setProperty("user.home", System.getProperty("user.home"));
            //
            // Load the current transaction database
            //
            database = new Database(dataPath+fileSeparator+"MyMoney.database");
            database.load();
            //
            // Process scheduled transactions
            //
            Main.processScheduledTransactions();
            //
            // Start the Swing GUI using the system look and feel
            //
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    createAndShowGUI();
                }
            });
        } catch (Exception exc) {
            Main.logException("Exception during program initialization", exc);
        }
    }