I have created a scratch file scratch.java
I added a new plain java module that contains the following:
I have specified the dependency in the build configuration for the scratch file:
The dependencies are not found when I try and edit and build the scratch file.
How can I easily add dependencies to a scratch file in intelij?
In the Run/Debug Configuration... setting, you can make your scratch file run using a specific classpath or module. Just change Use classpath of module
or Program arguments
.