Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jar file

 
joe moe
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sometimes i observed the line number it refers is next line than actual line where the error occured.
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what makes you think that's what you need; you need the class/interface it says is missing, not some other one.

Is the j2ssh stuff on the classpath?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic