I migrated my workspace from Eclipse to Intellij, in Intellij I have a project build from two modules, the run configuration are set on one module but the main class is in the second one.
in Eclipse it works fine, but in Intellij I get "Error: Could not find or load main class [class name]".
I created a dependency in the project structure, and played a lot with the running configurations which didn't help.
Any ideas? does any one have an experience with this structure in intellij?
Adding more details:
- I imported two eclipse projects to intellij - UI project which uses a jar from core project.
- The two projects are depended, my goal is to run the UI project which use a jar from the core project, and be bale to debug in the IDE the code
from both projects. - In Eclipse it is done by adding the core project to the classpath in the debug configuration classpath before the UI (running) project.
In intellij I added runtime dependency between the projects which didn't work. The project is running but from the Jar and not from the code of the second project - so I can't debug the code.
The main class is in the core project, I tried to delete the created core jar from the classpath of the UI project and run it with module dependency, but it failed on main class not found error.
Ideas?
Thanks