开发者

"unable to resolve class groovy.io.FileType" error

开发者 https://www.devze.com 2023-03-12 19:34 出处:网络
What\'s causing this? $ echo -e \"import groovy.io.FileType;\\nprintln \'hello\'\" > foo.groovy $ groovy foo.groovy

What's causing this?

$ echo -e "import groovy.io.FileType;\nprintln 'hello'" > foo.groovy
$ groovy foo.groovy 
org.codehaus.groovy.control.Multip开发者_运维技巧leCompilationErrorsException: startup failed, /work/fun/BitMarket/database/foo.groovy: 1: unable to resolve class groovy.io.FileType
 @ line 1, column 1.
   import groovy.io.FileType;
   ^

1 error

My Groovy version is 1.6.4. Was this class added in a later version?


Based on the GroovyDocs the class groovy.io.FileType was introduced in Groovy version 1.7.1. The GroovyDocs for version 1.6.4 don't indicate that this class exists. I guess you have to upgrade your Groovy JDK.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号