I have used launch4j to wrap an executable jar into an exe in my pom.xml (maven project file) file during compile/build time.
But is it possible to run launch4J from a piece of java code and creating an exe wrapper dynamically when the java application is executed, like:
import some.l4j.dependencies.*;
public class L4JTest {
public static void main(String[] args) {
Launch4JConfig l4jConfig = new Launch4JConfig ();
l4jConfig.setJarPath("path-to-jar-to-wrap");
l4jConfig.setOutfile("test.exe")
l4jConfig.setDontWrapJar(true);
...
l4jConfig.create();
}
}
Any pointers or links to examples are welcome!