Q: Could not find or load main class Main.class in Multi Module Maven Project I have a mulit-module Maven Project (with SpringBoot) where one submodule contains a Main class and the others do not.
Now, when I attempt to start the application I keep getting a Could not find or load main class Main.class error.
My folder looks as following:
root
\-- Submodule-1
   \-- src
     \-- main
       \-- java
         \-- com.company.package.blabla
           \-- Main.java
\-- Submodule-2
\-- Submodule-3

The error appears by using the following command in the root directory: $java com.company.package.blabla.Main (I also tried it with backslashes instead of fullstops)
Funnily, this command works (while in the root directory): $java /Users/username/IdeaProjects/Work/projectName/Submodule-1/src/main/java/com/company/package/blabla/Main.java
What am I missing here?
