cmd run Java Chinese garbled, can not load the main class Error: Could not find or load main class

Online said a lot of ways, just say I used the

Java Chinese garbled run cmd

Set environment variables - system environment variables

Add an entry: JAVA_TOOL_OPTIONS
value: -Dfile.encoding = UTF-8 -Duser.language = en

Unable to load the main class

  1. Remove package *
  2. If the test at src class catalog. After compiling, running in the same directory src
    · · ·
    the Java src.test
    · · ·

Guess you like

Origin www.cnblogs.com/so-easy/p/11369745.html