title: How to make a Java app modular
body: <p>I'm trying to make my Java app modular, so that there will be the core base module that a client will have to aqcuire, but he/ she will be able to add additional features/ plugins as they come up, or as her needs extend. Like how IDEs like NetBeans go about it.</p>
  
  <p>I plan on having a sub-directory, called modules/ plugins, in the  clients pc where any plugin applications will be included as .jar files. The main module will, when a user launches the application, include these other plugins in the final item, so that, for example, a <a href="https://docs.oracle.com/javafx/2/api/javafx/stage/Stage.html" rel="nofollow">Stage</a> will have buttons from both the main module and plugin modules on the same <a href="https://docs.oracle.com/javafx/2/api/javafx/scene/Scene.html" rel="nofollow">scene</a>.</p>
  
  <p>I'm fluent with <a href="https://elgg.org/" rel="nofollow">elgg</a>, which uses views to do this. Borrowing from this, I could have a HBox, for example on the main module that gets populated with Buttons from the different plugins on launching the application.</p>
  
  <p>How can I go about having core_base_module.jar below call all plugins in the plugins directory below. In other words, how can I go about having one <code>.jar</code> file calling another <code>.jar</code> file?</p>
  
  <p>Sample directory structure:</p>
  
  <pre><code>main dir/---core_base_module.jar
          /---plugins ---/chat.jar
                         /videoplayer.jar
                         /like.jar
                         /unlike.jar
                         /etc.jar
                         /etc_etc.jar
  </code></pre>