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
Read More:
- Problems encountered after Maven installation or upgrade: could not find or load main class org.codehaus.plexus .class…..
- Error: Could not find or load main class ***
- Could not find or load main class
- The Java command could not find or load the main class
- Tomcat9 Error: Could not find or load main class org.apache.catalina.startup.Bootstrap
- Error: Could not find or load main class org.apache.hadoop.hbase.util.HBaseConfTool
- Idea error: unable to find or load the main class
- Java error: unable to find or load the main class
- Error: the main class usertest could not be found or loaded
- Unable to find or load master class org.codehaus.groovy.grails.cli.support
- Idea startup project: main class not found or cannot be loaded
- The main class could not be found or loaded when springboot started
- Failed to load Main-Class manifest attribute from when the jar file is running
- When jar file is running: Failed to load Main-Class manifest attribute from ……Solution
- python: This application failed to stat could not find or load the Qt platform plugin “windows”
- Hive execution task report cannot find main class error
- The main class com.hp.springbootapplication cannot be found or loaded
- This application failed to start because it could not find or load the Qt platform plugin “windows”.
- This application failed to start because it could not find or load the QT platform
- [Solved] IntelliJ IDEA Compile Groovy Error: GroovyRuntimeException: This script or class could not be run.