我将标准 jar 文件 + juh-2.4.1.jar 和 ridl-3.2.1.jar(导入时出错)作为我项目中的引用库。当我从http://api.libreoffice.org/examples/DevelopersGuide/examples.html#FirstSteps获取示例代码时,我总是遇到此错误:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/star/comp/loader/JavaLoader
at com.sun.star.comp.helper.Bootstrap.createInitialComponentContext(Bootstrap.java:118)
at com.sun.star.comp.helper.Bootstrap.bootstrap(Bootstrap.java:241)
at TextDocuments.getRemoteServiceManager(TextDocuments.java:410)
at TextDocuments.storePrintExample(TextDocuments.java:378)
at TextDocuments.runDemo(TextDocuments.java:152)
at TextDocuments.main(TextDocuments.java:142)
Caused by: java.lang.ClassNotFoundException: com.sun.star.comp.loader.JavaLoader
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)
... 6 more
在引导程序上总是出现 NoClassDefFoundError .. 正在搜索但找不到太多.. 有人知道如何解决这个问题吗?