The Internet said a lot of methods, only said I used
CMD runs Java Chinese garbled code
Set environment variable — system environment variable
Add entry: JAVA_TOOL_OPTIONS
value: -dfile.encoding = utf-8-duser. language=en
The main class could not be loaded
Method 1. Remove the package *
method 2. Suppose the class test is in the SRC directory. Once compiled, run in the SRC sibling directory
java src.test
Reproduced in: https://www.cnblogs.com/so-easy/p/11369745.html