How to specify JVM argument for Maven built executable JAR

前端 未结 5 1971
梦谈多话
梦谈多话 2020-12-19 06:16

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 <

5条回答
  •  悲&欢浪女
    2020-12-19 06:55

    I don't know of any such mechanism. The JVM configuration is specified by the calling java command.

    Here's the jar file specification which conspicuously doesn't mention any attribute other than Main-Class for stand-alone execution:

    http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html

提交回复
热议问题