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
- Error: could not find java.dll Error: could not find Java se runtime environment solution
- could not open `C:\Program Files\Java\jre1.8.0_191\lib\amd64\jvm.cfg’
- Install Java runtime JRE in Ubuntu 16.04
- Configuring common environment variables in Windows
- Error running ‘** [install]‘: No valid Maven installation found. Either set the home director
- Error running Eclipse: failed to load the JNI shared library
- supervisor ERROR (spawn error)
- package xxx does not exist cannot find symbol
- The process of solving Intellij IDEA can’t load jvm DLL error at a time
- Could not find or load main class
- Analysis and solution of RSA premaster secret error
- Fatal error matching: invalid target distribution: 11
- Unexpected token o in JSON at p
- Problem in configuring Maven error: Java_ HOME not found in your environment.
- Problems encountered after Maven installation or upgrade: could not find or load main class org.codehaus.plexus .class…..
- Vue More than 1 blank line not allowed
- Solve the problem of Python in Windows environment: Fatal error in launcher: Unable to create process using’”‘ in pip installation
- The python version output from the command line is inconsistent with the python version in the current CONDA environment
- Start Eclipse and pop up the “Failed to load the JNI shared library jvm.dll” dialog box