Specifying JVM arguments when calling a jar file?

前端 未结 4 1670
花落未央
花落未央 2020-12-04 23:56

I want to specify some JVM arguments when calling a jar file like so:

java -jar filename.jar

I assumed I did it like so:

j         


        
相关标签:
4条回答
  • 2020-12-05 00:19

    Do it like:

    java -Xms256m -Xmx512m -Djava.awt.headless=true -jar filename.jar
    
    0 讨论(0)
  • 2020-12-05 00:20

    hype jar was missing , try

    java -Xms256m -Xmx512m -Djava.awt.headless=true -jar
    
    0 讨论(0)
  • 2020-12-05 00:24
    java [Options] -jar  [jarfile] [Command Line Arguments]
    

    Please refer

    http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html

    0 讨论(0)
  • 2020-12-05 00:33

    Don't put a space between the -D and java.awt.headless=true.

    It should be -Djava.awt.headless=true.

    0 讨论(0)
提交回复
热议问题