ken
ken

Reputation: 193

How to run a java project with vm arguments from command line?

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

Upvotes: 1

Views: 3629

Answers (1)

artbristol
artbristol

Reputation: 32397

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.

Upvotes: 3

Related Questions