title: Execute Java code that is stored in the database
body: <p>I have Java code that is regularly pushed to the database (it is too complicated to explain why it is in the database, and that would just turn the focus away from the main question).</p>
  
  <p>During runtime I query the database. Can I execute the code I get from the database? I am only storing the content of the main method in the code. The server on which the database runs is an HTTP server.</p>
  
  <p>Example code from the database (just for reference):</p>
  
  <pre><code>int i = 10;
  int j = 2;
  int k = i*j;
  System.out.println("Result is " + k);
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>Result is 20
  </code></pre>