Error: Could not find or load main class –Xmx1G

前端 未结 2 1292
隐瞒了意图╮
隐瞒了意图╮ 2021-01-12 22:04

This is crazy; has anyone ever seen this before?

java –Xmx1G –Xms1G –XX:+UseG1GC -XX:+PerfDisableSharedMem -jar service-1.0-SNAPSHOT.jar
Error: Could not fin         


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-12 22:19

    You used an en-dash (U+2013) when you should have used a hyphen-minus (U+002D).

     –Xmx1G # incorrect: en dash
     -Xmx1g # correct: hyphen-minus
    
    • https://en.wikipedia.org/wiki/Dash#Common_dashes
    • https://en.wikipedia.org/wiki/Dash#Similar_Unicode_characters

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题