2014-11-04 20 views
1

我想寫一個java程序,它可以通過我的本地客戶端郵件通過蓮花筆記api自動發送。我在哪裏可以獲得Notes.jar或NCSO.jar?

對於這個項目我添加了domingo-1.5 libary到我的類路徑。

但是,運行我的測試程序時,我得到:

Exception in thread "main" de.bea.domingo.service.NotesServiceRuntimeException: One of Notes.jar or NCSO.jar must be in classpath 
    at de.bea.domingo.service.NotesServiceFactory.throwWrappedException(NotesServiceFactory.java:335) 
    at de.bea.domingo.service.NotesServiceFactory.<init>(NotesServiceFactory.java:137) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) 
    at java.lang.reflect.Constructor.newInstance(Unknown Source) 
    at java.lang.Class.newInstance(Unknown Source) 
    at de.bea.domingo.DNotesFactoryFinder.newInstance(DNotesFactoryFinder.java:116) 
    at de.bea.domingo.DNotesFactoryFinder.find(DNotesFactoryFinder.java:73) 
    at de.bea.domingo.DNotesFactory.newInstance(DNotesFactory.java:155) 
    at de.bea.domingo.DNotesFactory.getInstance(DNotesFactory.java:82) 
    at NLotus.main(NLotus.java:22) 
Caused by: java.lang.NoClassDefFoundError: lotus/domino/NotesException 
    at de.bea.domingo.service.NotesServiceFactory.<init>(NotesServiceFactory.java:135) 
    ... 10 more 
Caused by: java.lang.ClassNotFoundException: lotus.domino.NotesException 
    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) 
    ... 11 more 

任何建議,我可以得到Notes.jarNCSO.jar

我將不勝感激您的回覆!

+0

我想你需要安裝Lotus Notes客戶端... – 2014-11-04 10:37:32

+0

從供應商處,請參閱此[頁面](http://domingo.sourceforge.net/download.html)(系統要求)。 – Stefan 2014-11-04 10:41:01

+2

它是IBM Notes客戶端安裝的一部分 - 請參閱此答案的實例:http://stackoverflow.com/a/26529701/785061 – 2014-11-04 10:55:49

回答

2

您應該首先注意的事項: (1)您只能在裝有Lotus節點的計算機上運行此程序。 (2)您不需要將Notes.jar添加到項目的類路徑中。

您需要做的是在Lotus節點安裝的lib文件夾中找到Notes.jar,並將系統'Classpath'設置爲包含該jar的位置(在窗口環境中,您可以在環境設置中對其進行配置)。最後,程序應該運行成功。

+2

這對於Notes.jar是正確的,但問題也會詢問NCSO.jar,那是打算用於未安裝Lotus Notes的機器上。您可以將其從有效的Notes或Domino安裝中取出,並使用兼容的JVM將其複製到任何其他計算機上。 – 2014-11-04 14:57:45

0

如果您在窗口安裝Domino中,你會發現它在C:\ Program Files文件(x86)的\ IBM \的Domino \ JVM \ lib中\分機\ Notes.jar文件