• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

jar file

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sometimes i observed the line number it refers is next line than actual line where the error occured.
 
Marshal
Posts: 28297
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic