Search code examples
javaintellij-ideaclasspathclassloader

Overriding the debug classpath in IntelliJ when using custom ClassLoaders


I'm debugging a project in IntelliJ which uses multiple ClassLoaders. I have a number of libraries included as JARs which are used for compilation. When I debug I want to start the JVM with no classpath since my dependencies are loaded by my customized ClassLoaders.

But IntelliJ automatically builds the default classpath and passes this to the JVM. I can't find a way to override this behaviour. Is it possible to force a debug configuration which starts with an empty classpath?

Thanks, Jon


Solution

  • Possible, create a dummy module with no extra classpath elements and in the Run/Debug configuration specify this module to use the classpath of.