开发者

Grails - import jsch results in "package com.jcraft.jsch does not exist"

开发者 https://www.devze.com 2023-03-08 01:15 出处:网络
I\'m porting some java code into GRAILS framework and I keep getting this error when importing libraries (jcraft):

I'm porting some java code into GRAILS framework and I keep getting this error when importing libraries (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.*;
  [groovy开发者_开发百科c] ^

I've tried adding this to 'BuildConfig.groovy', but still same error.

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. Many thanks.


have you tried to copy this library into the lib folder of the grails-app structure and removed all refernces from e.g. BuildConfig.groovy ...

i can also try to unpack the library and check if the lib-structure is correct.

0

精彩评论

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

关注公众号