I need to create runnable .jar
file programmatically from a string. My decision is to create a .class
file from string and add it to the .jar
using JarOutputStream.
.class
file?.jar
from the source code?In order to do that, you can use the Java Compiler API.
There is this excellent tutorial that can walk you through.