你好夥計們我想弄清楚爲什麼當我試圖在我的linux系統上從Shell運行這個API時出現這個錯誤。在Linux操作系統上的Java錯誤
[〜/的public_html /測試/]#java -jar jodconverter-cli-2.2.2.jar Amritpal.doc sample.pdf
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli/CommandLineParser
Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.CommandLineParser
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: com.artofsolving.jodconverter.cli.ConvertDocument. Program will exit.
嗨,它仍然無法通過添加-cp〜/ commons-cli-1.2.jar工作,這對你有好處嗎? – why 2013-04-07 12:43:01