Intellij idea Groovy@Grab-maging";找不到适合grab的类加载器“;在Intellij中

Intellij idea Groovy@Grab-maging";找不到适合grab的类加载器“;在Intellij中,intellij-idea,groovy,Intellij Idea,Groovy,我刚刚开始在Intellij中编辑我的(已经在工作的)groovy脚本,并且遇到了一个有线问题。我无法使用谷歌找到解决方案 我有以下代码: @Grapes([ @Grab('org.codehaus.groovy.modules.http-builder:http-builder:+'), @Grab('log4j:log4j:1.2.17'), @Grab(group='com.sun.jersey', module='jersey-client', version='1.9.1'), @Gr

我刚刚开始在Intellij中编辑我的(已经在工作的)groovy脚本,并且遇到了一个有线问题。我无法使用谷歌找到解决方案

我有以下代码:

@Grapes([
@Grab('org.codehaus.groovy.modules.http-builder:http-builder:+'),
@Grab('log4j:log4j:1.2.17'),
@Grab(group='com.sun.jersey', module='jersey-client', version='1.9.1'),
@Grab(group='com.sun.jersey', module='jersey-core', version='1.9.1'),
@Grab(group='com.sun.jersey.contribs', module='jersey-multipart', version='1.8'),
])

@Log4j
class DevTest{

    static void main(String[] args) {
          println "TEST"
    }
}
当我在命令行中运行它时,它就工作了。在Intellij中,先按 CTRL+Shift+F9,然后CTRL+Shift+F10,我得到以下错误:

java.lang.ExceptionInInitializerError Caused by:
java.lang.RuntimeException: No suitable ClassLoader found for grab
我还尝试添加@GrabConfig(systemClassLoader=true),正如在其他文章中建议的那样,但结果保持不变。 可能是什么问题?

可能是重复的