title: How dynamically create\load new classes in java?
body: <p>I have a simpe Swing application for drawing different shapes (circle, triangle, square and etc.). It works like that: you have to choose shape type, click somewhere in the apllication window and get the chosen shape drawn where you clicked. And I have to add a functionality that allows to add new shapes (classes) on the runtime via plugin.</p>
  
  <p><em>Plugin</em> is a file that somehow describes a new shape (class) and its functionality and exists somewhere in the system (in some folder).</p>
  
  <p><strong>My question</strong>: what is the best way to implement this? What approaches, libraries and sources can you recommend?</p>
  
  <p>I have found some information about JPF (Java Plug-in Framework), but I'm not sure that this is what I need becaust it looks quite enormous and seems to be used for other purposes (maybe I'm wrong).</p>
  
  <p>Thank you.</p>