Invoke main method from other class
<p>I am trying to directly call the main method of one class from another, but I get the following error:</p>

<blockquote>
  <p>the method main(String[] args) in the type connect is not applicable to arguments().</p>
</blockquote>

<p>This is the class I from which I am trying to call:</p>

<pre><code>public class CreateGUI extends JFrame {
    public void actionPerformed(ActionEvent event) {
        connect sp = new connect();
        sp.main();
    }
}
</code></pre>

<p>And this is the class I am trying to call:</p>

<pre><code>public class connect {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");
        Connection sql = DriverManager.getConnection(
                "jdbc:mysql://localhost:3306/performance", "root", "root");

        //...
    }
}
</code></pre>
