Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

easy way to add jar dependencies to a scratch file in intelij

I have created a scratch file scratch.java

I added a new plain java module that contains the following:

enter image description here

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?

enter image description here

like image 830
Jim Avatar asked May 23 '18 06:05

Jim


People also ask

What is path to scratch file in IntelliJ?

Location of scratch files and buffers By default, IntelliJ IDEA stores scratch files and buffers in the IDE configuration directory under scratches. They are available from any IDE and project that uses this configuration directory. Windows.


1 Answers

In Run/Debug Configuration... setting you can make your scratch-file to be run using a specific classpath or module. Just change Use classpath of module or Program arguments.

like image 107
Taher Khorshidi Avatar answered Nov 02 '22 05:11

Taher Khorshidi