I am attempting to run a SpringBoot Application called "Doc-api" in intellij, using a Gradle. (Not Maven.) The program was working recently, and now it refuses to even build and it seems to have something to do with the configuration being wrong (Or perhaps the gradle.)
Added a gradle:
Build and run using: Intellij IDEA Run tests using: Intellij IDEA Use Gradle from: 'gradle-wrapper.properties' file Gradle JVM: Project SDK 1.8(3)
Added a configuration: Type: application Name: DocApi Main class: "com.company.doc.DocApi" (the "DocApi" is in red for some reason) Environment variables: a huge paragraph containing passwords and stuff. JRE: 18(3) (java version 1.8.0_282) At the bottom, there is an error message saying: "Class 'com.company.doc.DocApi' not found in module 'doc-api'"
In the Configuration Window: the main class puts red font on "DocApi." Does that mean it can't see it? It's definitely in my src folder: "DocApi.java." saved under: src/main/java/com/company/doc/DocApi.java
In the Project Explorer: my "DocApi.java" file (and the rest of my java files in the same place) all have a filetype icon, an orange circle with a J in the middle. Hovering over it says: "java file outside of source root".
In the project explorer, my "doc" folder is colored orange, apparently this is an "excluded folder." Does this mean that this file can't be used for a content root?
I also checked my source content root folder in File, Project Structure, Modules, Currently, this is set as: C:\workspaces\workspace15\doc-api\src My static main file "DocApi.java" was saved into the "src" folder under: src/main/java/com/company/doc/DocApi.java. To me, that means the content root folder is looking in the right place, right? So why isn't it working? Why can't the system seem to find it?
And yes, in this current state, I have tried the advice of "Invalidate Caches and Restart," this has no effect.
Q1: How do I unexclude excluded folders? Q2: Why can't the system find my chosen content root folder?