我一直在开发一个java项目,我需要创建一个ssh隧道。我正在使用chilkat库来达到这个目的。我已经在我的项目文件夹中成功安装了它。这是代码片段。 但我收到错误说:import com.chilkatsoft。*未解决
import com.chilkatsoft。* not resolved。
的代码是:
package usingchilkat;
import com.chilkatsoft.*;
public class myclass {
static {
try{
System.loadLibrary("chilkat");
`` } catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
// Important: It is helpful to send the contents of the
// ssh.LastErrorText property when requesting support.
CkSshUnnel ssh = new CkSsh();
boolean success = ssh.UnlockComponent("Anything");
if (success != true) {
System.out.println(ssh.lastErrorText());
return;}
}
谁能帮我解决这个问题?
您是否尝试过'进口com.chilkat *;'? – Swagin9
是的。但它显示了同样的错误。 – Preety