I want to run a Project in IntelliJ, with a main class which is not inside my project folder. When I click the three dots to the right of the input, I can find this class (outside my project folder). However, once I run the project I get an error:
Error: Could not find or load main class org.vertx.java.platform.impl.cli.Starter
What I understand is that IntelliJ is looking for the main class INSIDE the project folder, and therefore, it can't find it.
My question is how to make IntelliJ activate a main class outside the project folder.
Edit: I also tried to add this external jar to Project Structure:
and it still didn't help.
Add
vertx-platform
as a dependency to your module (in your pom.xml), then run it and select your module as the classpath.