Error: Could not find or load main class –Xmx1G

前端 未结 2 1288
隐瞒了意图╮
隐瞒了意图╮ 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条回答
  • 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
    0 讨论(0)
  • 2021-01-12 22:23

    JVM arguments considered hyphen to consider JVM arguments. If you are using MAC book, It could be easily delusional for view

    A hyphen, -, separates words in phrases, as in “least-used product” and is used for line breaks in books and other matter.

    An em dash, —, is used to set off a phrase—one in the middle of the sentence—that’s not quite a parenthetical, but it isn’t so germane as to be set off by commas. It’s also used as a sort of pause to emphasize something—something important at the end of a sentence.

    An en dash, –, separates ranges for dates, numbers, and quantities—like 9–5 and January–August. It’s also used for certain kinds of connections, directions, and contrasts, such as standing in for “versus” in Lincoln–Douglas debates or in place name pairing like Alsace–Lorraine, where both are separate places being referred to together.

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