Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

howto run JSCH with jar

Help
Lazarus71
2011-03-24
2013-05-28
  • Lazarus71
    Lazarus71
    2011-03-24

    Can anyone tell me how can i use jsch from command line with jsch-0.1.44.jar without compile it ???

    thanks
    Lazarus

     
  • Lazarus71
    Lazarus71
    2011-03-24

    when i try to use "java Shell -cp jsch-0-1-44.jar " or "java Shell.java -cp jsch-0-1-44.jar " after compile with javac -cp jsch-0.1.44.jar Shell.java
    i have this message.

    D:\>java Shell -cp d:\jsch-0.1.44.jar

    Exception in thread "main" java.lang.NoClassDefFoundError: com/jcraft/jsch/UserInfo
    Caused by: java.lang.ClassNotFoundException: com.jcraft.jsch.UserInfo
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: Shell.  Program will exit.

    i am a new bye with java

    please help me