Opening other people's projects in IDEA can't run, right click and there is no run option to solve the problem
1. Problem description:
The following problems occurred when opening someone else's project:
- Question 1: Without the run option, there is no way to run it.
- Question 2: There are many red line errors.
2. Reason
SDK is jdk, no choice
3. Solutions
-
Click File → Project Structure, as shown in the figure below.
-
The cause of the problem was found, JDK was not configured
-
Pull down to select the appropriate JDK, mine is JDK1.8, yours may also be JDK1.11.
Then click Apply first, then click OK.
problem solved.
Note: If it doesn't work, restart the project to see.
Note: 99% of users will solve the problem after performing the above steps, but if it is still not solved, then follow the steps below.
1. The SDK is specified, but it still does not run
- Open the Maven Projects window (on the right side of the idea window, if not, just open the window below)
- Click "+", select the pom file that needs to start the project, and click ok
- The project and all subprojects under the project will appear in the right column
- Click to expand the project that needs to be started -> Lifecyle
- double click install
2. Make sure the program has a main method and specify the SDK, then manually configure the launcher
Little Triangle SelectionEdit