title: How to build generated and executable jar file
body: <p>I have a directory in which I generated *.class files. How can I build executable jar file from this files. </p>
  
  <p>What I need to know is </p>
  
  <ul>
  <li>how to clean dir</li>
  <li>how to put all files in jar and make it executable</li>
  </ul>
  
  <p>Sorry people i didnt mentioned, i need do this programmatically in java code.</p>