使用SSH的Andr​​oid编程SSH、Andr、oid

由网友(久了就旧了)分享简介:我试图使用SSH从我工作的一个Android应用程序连接到我自己的服务器,但是我不能为我的生命得到它的工作,我已经尝试了许多不同的东西,包括JSch,但是我不能让这个工作,我每次尝试的事情具有相同的错误结束:I am trying to use SSH to connect to my own server from...

我试图使用SSH从我工作的一个Android应用程序连接到我自己的服务器,但是我不能为我的生命得到它的工作,我已经尝试了许多不同的东西,包括JSch,但是我不能让这个工作,我每次尝试的事情具有相同的错误结束:

I am trying to use SSH to connect to my own server from an Android application I am working on, however I cannot for the life of me get it to work, I have tried many different things including JSch, however I cannot get this to work, every thing I try ends up with the same error:

04-14 22:06:57.329: E/AndroidRuntime(5641): FATAL EXCEPTION: main
04-14 22:06:57.329: E/AndroidRuntime(5641): java.lang.NoClassDefFoundError: com.jcraft.jsch.JSch
04-14 22:06:57.329: E/AndroidRuntime(5641):     at com.xynteq.terminal.LinuxCommandsActivity.executeRemoteCommand(LinuxCommandsActivity.java:51)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at com.xynteq.terminal.LinuxCommandsActivity.onCreate(LinuxCommandsActivity.java:25)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at android.app.ActivityThread.access$1500(ActivityThread.java:123)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at android.os.Looper.loop(Looper.java:130)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at android.app.ActivityThread.main(ActivityThread.java:3835)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at java.lang.reflect.Method.invokeNative(Native Method)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at java.lang.reflect.Method.invoke(Method.java:507)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
04-14 22:06:57.329: E/AndroidRuntime(5641):     at dalvik.system.NativeStart.main(Native Method)

我想要么想出一个办法来得到这种方法工作,或找出任何其他方式在Android应用中使用SSH,并能够执行命令

I would like to either figure out a way to get this method to work, or figure out any other way to use SSH in an Android application, and be able to execute commands

推荐答案

在Eclipse中:

Project > Properties > Java Build Path > Order and Export > Check jsch and jzlib
阅读全文

相关推荐

最新文章