Intellij IDEA is not recognizing java files as runnable

  • right-mouse click on your src
  • navigate to “Mark Directory As”
  • choose “Sources Root” It will now recognize your files correctly and your main classes will be able to run again

Web server failed to start. Port 8080 was already in use.

  • First check what processes are using that specific port, then killing it using its process ID:
  1. Run netstat -ano | findstr < Port Number > This will identify which process is listening on port 8080.
  2. Take note of the process ID (PID) e.g. 63262
  3. Run taskkill /F /PID < Process Id > replace < Process Id > with PID

Set the JDK for your project and/or modules.

Open the project settings (File->Project settings…).

Most of the time you just need to set the project sdk (to your java sdk) and configure the modules to use the project sdk.
Probably one of those settings is missing.

delete the push record in git

https://zhuanlan.zhihu.com/p/35078876

Dependency

In a Maven-based Java project, a POM (Project Object Model) file is an XML file that contains information about the project and its dependencies. The dependencies section of a POM file lists the external libraries (or other modules within the project) that the project needs in order to compile and run successfully.

Each dependency in the POM file typically includes the following information:

  • Group Id: A unique identifier for the group or organization that created the dependency.
  • Artifact Id: The name of the dependency.
  • Version: The version of the dependency that the project requires.
  • Scope: Indicates the scope of the dependency, such as compile, test, runtime, or provided.

When Maven builds a project, it reads the POM file and downloads all the necessary dependencies from the Maven Central Repository (or other configured repositories), which it uses to compile and run the project. The POM file therefore plays a crucial role in managing the project’s dependencies and ensuring that the correct versions of libraries are used consistently across the project.

each dependency listed in the dependencies section of a Maven POM file represents an external library or module that the project needs in order to compile and run successfully.

When a Maven project is built, the dependencies are downloaded from remote repositories (such as the Maven Central Repository) and stored locally on the developer’s machine, in a directory called the local repository. These dependencies are typically jar files (Java Archive files) that contain compiled Java code and any required resources, such as configuration files or documentation.

By including dependencies in the POM file, Maven can automatically download and manage the required libraries for the project, making it easier to build and distribute the project to other developers. This also helps ensure that all developers are using the same versions of the dependencies, which can help prevent compatibility issues and simplify debugging.

Curl Command

https://www.geeksforgeeks.org/curl-command-in-linux-with-examples/