Xpages an issue with jar file

2019-09-07 11:25发布

I've created a "*.jar" file with Intellij IDEA and added to IBM Notes Domino 9 with Code -- Jars -- Import Jar. I can see my packages in classes which stored in "Code -- Java") but i have an error when i try to use my jar in xpages code:

I have a simple code on my test xpage:

importPackage(com.ibm.ibateam.sources);
var area = new Area("first");
getComponent("label1").setValue(area.getUnid());

but this code throws exception:

Script interpreter error, line=2, col=16: [ReferenceError] 'Area' not found
1: importPackage(com.ibm.ibateam.sources);
-> 2: var area = new Area("first");
3: getComponent("label1").setValue(area.getUnid());

I've tried everything with Java Build Path but nothing works.

I also tried use information from this link:

http://www.xpagetips.com/2012/06/extending-your-xpages-applications-with.html

but move to "WEB-INF/lib/..." didn't help

I know I can add my jar to "...Notes\jvm\lib\ext)" or to eclipse plugins but I don't like this solution because I want to store my jar in notes database.

0条回答
登录 后发表回答