[英]Grails - import jsch results in “package com.jcraft.jsch does not exist”
I'm porting some java code into GRAILS framework and I keep getting this error when importing libraries (jcraft):我正在将一些 java 代码移植到 GRAILS 框架中,并且在导入库(jcraft)时不断收到此错误:
import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.Session;
import com.jcraft.jsch.ChannelSftp.LsEntry;
MyServiceImpl.java:47: package com.jcraft.jsch does not exist
[groovyc] import com.jcraft.jsch.*;
[groovyc] ^
I've tried adding this to 'BuildConfig.groovy', but still same error.我已经尝试将它添加到“BuildConfig.groovy”,但仍然是同样的错误。
dependencies {
compile 'com.jcraft:jsch:0.1.43'
Any idea what I need to add?知道我需要添加什么吗? I also added the actual jar file in the Build path library.
我还在构建路径库中添加了实际的 jar 文件。 Many thanks.
非常感谢。
have you tried to copy this library into the lib folder of the grails-app structure and removed all refernces from eg BuildConfig.groovy...您是否尝试将此库复制到 grails-app 结构的 lib 文件夹中,并从例如 BuildConfig.groovy 中删除所有引用...
i can also try to unpack the library and check if the lib-structure is correct.我也可以尝试解压缩库并检查库结构是否正确。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.