1. First of all, to determine whether it is an environmental variable
If you input javac command and Java command in the command line, you can output a lot of things, which means that there is no problem in the configuration of environment variables. Otherwise, you need to configure environment variables
First, create a new Java_ The value of the home variable is the installation path of JDK. For example, my value is “D:// developtools/Java/JDK”. The contents in quotation marks, excluding quotation marks, are the same below.
Then add% Java after the path variable_ Home% \ bin “and% Java_ HOME%\jre\bin”
Create a new classpath variable with the value of “.”,% JAVA_ HOME%\lib;% JAVA_ HOME%\lib\tools.jar;”
The environment variables are configured.
2. If the path of the java file is correct, it is still reported that Java cannot find or load the main class, that is the problem of the package name. CMD locates in the SRC folder of the module, calls the Java command, and the bytecode file name is with the package name
That’s it
div>
Read More:
- Problems encountered after Maven installation or upgrade: could not find or load main class org.codehaus.plexus .class…..
- Could not find or load main class
- Error: Could not find or load main class ***
- Java error: unable to find or load the main class
- Error: could not find or load 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
- 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
- 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”
- Failed to load Main-Class manifest attribute from when the jar file is running
- Error: could not find java.dll Error: could not find Java se runtime environment solution
- Hive execution task report cannot find main class error
- Could not find appears when JDK is configured java.dll Could not find Java se runtime environment problems
- 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