When using Maven to build an executable JAR, how do I specify the JVM arguments that are used when the JAR is executed?
I can specify the main class using <
I think this can be done if you think of it this way.
Generate a .bat
file that will have a command:
> java .. yourClass.. -D
You can try looking on this app assembler plugin for maven.
I tried it, and seems to work. I am still not clear how to make .bat file to be generated with the somewhat different content, but I think it is doable.
As another option, you may always try to create the .bat file in the resource sub folder of your project and include that sub folder with your distribution.