The blogger was using Intellij IDEA normally, but Intellij IDEA suddenly sounded wrong for unknown reasons. The error hints were as follows:
Error:Cannot run program “F:\WINDOWS Application Installation \ JRE \bin\ Java “(in directory “C:\Users\ Li Junde \.IntelliJIdea2018.1\ System \ Compile-Server “): CreateProcess Error =2, the system could not find the specified file.
Ii. Problem analysis
By observing the Intellij IDEA error, we know that it was caused by a failure to find the correct installation path for the JDK(Java Development Kit). There are many reasons why Intellij IDEA might not find the JDK: Maybe you accidentally removed it; Or if you install the JDK in a path with Chinese characters, Intellij IDEA does not recognize paths with Chinese characters; Or maybe you accidentally configured the WRONG ENVIRONMENT variable for the JDK on your computer.
The wrong solution
1. Make sure we have the JDK installed on our computer
In 2019, the new version of the JDK(also known as Java) already has the JDK and JRE bundled in it, so installing the JDK is equivalent to installing the JDK and JRE.
Press and hold
R on the computer keyboard,
pops out and run program, enter
to confirm. enter
Java --version in the black box console to view the Java version number.
If your computer pops up a prompt like the one above (describing the Java version number, release date, etc.), then your computer has the JDK installed correctly, and we go straight to the next step. Otherwise, it means that your computer did not properly install the JDK, you still have to search the latest version of Java in 2019 Java10 and above Java installation tutorial, the bloggers do not recommend small white users to install the old version of Java, the old version of Java needs to install the Java JDK and JRE, also need to configure environment variables, small white users are easy to make mistakes.
2. Properly set the JDK installation path at Intellij IDEA
Click the File option in the upper-left menu bar of Intellij IDEA, and then click the Project Structure sub-option.
In the configuration page for Project Structure, the project-JDK must not be red as shown in the figure below, because red indicates that there is no corresponding JDK under the file path.
First, make sure that you have followed the first step above to find the current Java version on your computer through the black box command Java — Version. Otherwise, you will have to reinstall the JDK before you see this step. Under the Project SDK TAB, we clicked on the small triangle arrow in the drop-down box to see if Intellij IDEA had helped us find an alternative JDK version. If so, we checked that Intellij IDEA was basically back to normal by selecting the existing JDK in the drop-down box.
If there is no existing JDK version in the drop-down box, we need to manually click New… , then select the “install the latest JDK on our computer properly” installation path. If you’ve just reinstalled the JDK you must remember the JDK installation path. If you’ve forgotten where you installed the JDK, type Java –verbose — in the black box and the JDK installation path appears at the end of the command line.
3. Save the configuration of Project Structure and recompile it to run the Java program normally
After OK, compile Run again to Run the Java program as normal.
- The process of solving Intellij IDEA can’t load jvm DLL error at a time
- IntelliJ idea error: package not found or symbol not found
- Error: could not find java.dll Error: could not find Java se runtime environment solution
- Error running Eclipse: failed to load the JNI shared library
- IntelliJ idea error: error: Java does not support release 5
- Access restriction in Eclipse: the type ‘xxx’ is not API solution
- IntelliJ idea community community integrated Tomcat or jetty tutorial
- IDEA报Unable to save settings: Failed to save settings. Please restart IntelliJ IDEA
- 解决Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
- How to Fix Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
- Failed building wheel for twisted solution appears after installing scratch
- Idea startup project Lombok error, no symbol found
- Idea always reports errors when using “SVN” to associate projects Error:Cannot run Program “SVN” (in directory “path XXXXXX”): CreateProcess error = 2,
- Solution of Java resources error reporting
- Git uploads local IntelliJ idea project to GitHub
- When IntelliJ idea is programmed, 1. Black thick line or black cursor appears; 2. The solution of carriage return unable to wrap. (practical recommendation method 2)
- Node.js Cannot find module ‘mysql’ ‘express’
- Windows10解决ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed
- Idea error: error: Java: error: release 5 is not supported
- error:could not open…jvm.cfg solution