问题
I'm writing a maven plugin which has to initialize another java project with specific VM arguments. according to the exec:java, they only take in arguments but not VMarguments, so my question is how to launch a java project with specific VMarguments from the command line? thanks
回答1:
You can't supply extra VM arguments if you use Maven's exec:java plugin because it runs in the same VM (i.e. it's already been initialized). You'll need to use exec:exec, and construct the java command line yourself.
来源:https://stackoverflow.com/questions/7305090/how-to-run-a-java-project-with-vm-arguments-from-command-line