method that converts a String with Java code into a Jar file
<p>I need to create a method that converts a String with Java code into a Jar file and then it can execute it, could somebody help me please?</p>

<p>Example:  </p>

<pre><code>String code = "public class test { public static void main(String[] args)"
    + "{System.out.println(\"Hi!\");}}";

public void stringCodeToJar(String code){

}
</code></pre>

<p>and then I can run the Jar file and see the <code>System.out.println</code>.  </p>
