Is there a way to change the order of JVM parameters when running/testing code? Let me give an example:
The standard IntelliJ 11 runs things with:
$ java -Didea.launcher.port=7535 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 11.app/bin" -Dfile.encoding=UTF-8 -classpath
Now, I'd like IntelliJ to run something this way:
$ java -Didea.launcher.port=7535 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 11.app/bin" -Dfile.encoding=UTF-8 <INSERT_HERE> -classpath
In INSERT_HERE, I'd like to add '-jar x.jar'. This is to force the JVM to run with a specific modular classloader.
The problem I currently have is that if I set VM options, these are inserted at the beginning:
$ java <CURRENTLY_INSERTED_HERE> -Didea.launcher.port=7535 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 11.app/bin" -Dfile.encoding=UTF-8 -classpath
Is there a way to change the order of this?
The only (hacky) workaround I can think of right now is to set VM parameters to be these, but IntelliJ will still insert the -Didea options after the VM parameters:
"-Didea.launcher.port=7535 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 11.app/bin" -Dfile.encoding=UTF-8 <INSERT_HERE>"
Any idea?