When I run a main class in IDEA, it puts the module and its dependencies on a module path. Is it possible to change it to a classpath?
When I run a main class in IDEA, it puts the module and its dependencies on a module path. Is it possible to change it to a classpath?
To answer the question, the heuristic IDEA uses to run an application with a module path is currently slightly off (IDEA 2018.01). It apparently takes more into consideration than it should.
See IDEA-187390 and IDEA-193714 for details.
So if your current project does not have a module-info file and you still end up with a module path the current case that I know is that you are running the main class from a dependency. Just build a small wrapper inside your project and run the main class from there, that brings you back to the classpath.