刚刚在Eclipse中完成了我的项目,使用Sphinx进行语音识别。在eclipse中程序运行正常,但在我导出.jar并从命令行运行后我得到了这个:
Exception in thread "main" java.lang.NoClassDefFoundError: edu/cmu/sphinx/util/p
rops/ConfigurationManager
at edu.cmu.sphinx.demo.helloworld.HelloWorld.main(HelloWorld.java:34)
Caused by: java.lang.ClassNotFoundException: edu.cmu.sphinx.util.props.Configura
tionManager
at java.net.URLClassLoader$1.run(Unknown Source)
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)
... 1 more
任何人都知道我做错了什么?谢谢!
答案 0 :(得分:0)
你的类路径中缺少第三方(Sphynx) 尝试:
java -cp; classname .....