Japhy Fan :
When I create a new Java scratch file in Intellij with this code:
import java.util.Date;
import org.apache.commons.lang3.time.DateFormatUtils;
class Scratch {
public static void main(String[] args) {
System.out.println(DateFormatUtils.format(new Date(), "yyyyMMddHHmmss"));
}
}
It shows
"Error:(2, 37) package org.apache.commons.lang3.time does not exist".
I only can use the jdk lib.
How can I modify the classpath used to run Intellij scratch files ?
y.bedrov :
Please try to specify the module with the dependencies in run configuration: https://i.imgur.com/tLOEcyS.png
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=357002&siteId=1