Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop intellij from adding specific jars to the classpath when debugging?

When I debug an application in intellij, it insists on including all the jars in side my jre/lib folder and sub folders. Unfortunately, one of the libraries I use manually loads each class on the classpath at startup to reduce loading times during operation.

As a result, debugging my app immediately results in the process spinning at 100% and then eventually dying. If I take the command line intellij uses and remove the jars in the lib folder from the classpath, the application executes as expected.

How do I make intellij not include the jre libs?

like image 333
AlecZorab Avatar asked Feb 15 '26 14:02

AlecZorab


1 Answers

Project Structure (Ctrl+Alt+Shift+S) | SDKs, select your JDK, in the Classpath tab remove the jars you don't need.

like image 169
CrazyCoder Avatar answered Feb 19 '26 19:02

CrazyCoder