Hi, I am getting this error below. I am trying to jar a file. Not sure what to do. The error points to an error in line number 55 of SendFiles, but I know this line is fine there. It has something to do with jaring the file.
Thanks,
Keith
java -jar SendFiles.jar
Exception in thread "main" java.lang.NoClassDefFoundError: com/sshtools/j2ssh/transport/HostKeyVerification
at SendFiles.main(SendFiles.java:55)
Caused by: java.lang.ClassNotFoundException: com.sshtools.j2ssh.transport.HostKeyVerification
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 1 more
keith@keith-desktop:~/workspace/Trial2/bin$ java -jar SendFiles.jar
Exception in thread "main" java.lang.NoClassDefFoundError: com/sshtools/j2ssh/transport/HostKeyVerification
Mathew Lee
Ranch Hand
Joined: Jun 08, 2009
Posts: 238
posted
0
sometimes i observed the line number it refers is next line than actual line where the error occured.
That class isn't in the jar, and the jar's manifest doesn't point to any other jar which contains it either. Talk to the person who created the jar file in the first place and ask them about whether there are other jars which go along with it, and if so where they should be put.
joe moe
Greenhorn
Joined: Aug 04, 2010
Posts: 2
posted
0
I have checked my jar file and it has this file AlwaysAllowingConsoleKnownHostsKeyVerification.class. So it seems that the jar file is pointing at the appropriate jars. Not sure what else to do.