When using javac to compile Java source code, if the code contains Chinese, regardless of whether the Chinese appears in a comment or a string constant, the following error may occur:
This is because javac cannot handle Chinese characters. At this time, just specify the decoding method. It can be UTF-8:
javac -encoding UTF-8 .\Imessage.java
Pay attention to the public account and receive more articles from me in the first time