title: Call from a main of one class, a main method of another class
body: <p>I have two bearing classes - a GUI one and Server. They both have main() methods. When a 'connect' button (from class GUI) is clicked I want to start up all the processes in class Server, by starting from its main() function. Am I able to do that at all, is there a way to avoid it?</p>
  
  <p>I've tired to:
   - Delete the main(String[] args) part of the Server class, rename it initServer and then through GUI to say </p>
  
  <pre><code>Server kb = new Server();
  kb.initServer();`
  </code></pre>
  
  <ul>
  <li><p>Say the following:</p>
  
  <p><code>Server.main()</code> (in this case I kept both classes with main()s)</p></li>
  </ul>
  
  <p>That is all I have right now, when clicked the Connect button its event takes place but all neither of the Server checks show up, in the command line. </p>