-3

私はsshトンネルを作成する必要があるJavaプロジェクトを開発しています。目的のためにchilkatライブラリを使用しています.プロジェクトフォルダに正常にインストールしました。これがコードスニペットです。しかし、次のようなエラーが表示されます。

import com.chilkatsoft.* 未解決。

コードは次のとおりです。

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;}
           }

誰でも私がそれを修正するのを手伝ってもらえますか?

4

1 に答える 1

2

java.library.pathシステム プロパティを正しく設定しましたか? お気に入り:

java -Djava.library.path=yourPath yourApp

または、すべてのパスを直接ロードします。

System.load("c:/yourPath/chilkat.dll");
于 2016-11-08T14:32:05.360 に答える