Is there a way to create a JAR-file that contains some arguments that are passed to the main class? (It does not matter whether it prepends or appends the arguments to potential command line arguments.)
I know I could simply write a bootstrapping class and specify this as main class (calling the real main class with the arguments), but this seems a bit awkward.
To the best of my knowledge, no. You’ll have to do that kind of thing yourself, in code.
A lot of people find it useful to write a little main class that sets up an environment and then acts as a ClassLoader for the “real” main program. Typically, such pre-mains fiddle with the classpath of their application, but your kind of problem is something else that could be solved like this.