Search code examples
javaintellij-idea

How can I use libraries in IntelliJ IDEA's scratch files?


I want to experiment with Jsoup functions in the scratch files, but all I get is

package org.jsoup does not exist

The library is imported both as a local, and as global one. I am really puzzled on how to make this work.


Solution

  • Maybe there is a better way, but I usually edit the run configuration for my scratch file, go to "Use classpath of module" and choose a project with the required dependencies.