1

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)

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

3
  • stackoverflow.com/… Commented Apr 15, 2012 at 3:19
  • possible duplicate of NoClassDefFoundError - Eclipse and Android Commented Apr 15, 2012 at 3:19
  • Its specific to this library, I can't get this library to work at all, I'm hoping someone else has figured out how to get this library to work, I know how to solve this problem in general. Commented Apr 15, 2012 at 15:03

1 Answer 1

2

In Eclipse:

Project > Properties > Java Build Path > Order and Export > Check jsch and jzlib
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.