如何在Java代理中包括自己创建的Java文件 [英] How to include self created Java files in Java agent

查看:58
本文介绍了如何在Java代理中包括自己创建的Java文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IBM Notes中,如果我创建Java代理,那么如何包括自己创建的Java文件:

In IBM Notes if I create a Java Agent, how do I then include my own created java files:

因此,我创建了一个cxmlCustom包,并将其包含在profileResponse中.请注意,在Java代理中导入cxmCustom无效.

So I created a cxmlCustom package and this I want to include in to the profileResponse. Note that import cxmCustom in the Java agent does not work..

接下来,我使用java类:Statuscode,以便创建一个具有以下值的对象:

Next to this I use the java class: Statuscode so that I can create an object which has for example these values:

Statuscode = 406
Text = Not Acceptable
Meaning = more text

在类StatusCodesList中,我在其中创建了一堆statuscode对象,并将这些创建的statuscode对象保存在数组中.

In the class StatusCodesList in which I create a bunch of statuscode objects and save these created statuscode objects in a array.

在我的profileResponse中,我想检索此对象.稍后在其他代理中,我将重用此statuscodelist类.我想知道这是否是个好方法吗?

In my profileResponse I want to retrieve this objects. Later on in other Agents I reuse this statuscodelist class.. I want to know if this is a good way to do this?

推荐答案

您不能使用 Java Agents 的 Designer's Code 部分中定义的 Java 类或 Jars.它们仅可用于XPages.

You can't use Java classes or Jars definied in Designer's Code section in Java Agents. They are only usable for XPages.

您必须将Java类复制到Java代理中.
或者,您可以创建Java类型的脚本库,然后在其中添加Java类,然后将此脚本库添加到Java代理中.
或者,您可以通过Java类创建一个jar文件,并按如下所述使用它: https://stackoverflow.com/a/27335314/2065611

You have to copy your Java classes into your Java agent.
Or, you can create a Script library of type Java and add your Java classes there and add this Script library to your Java agent.
Or, you create a jar file from your Java classes and use it like described here: https://stackoverflow.com/a/27335314/2065611

这篇关于如何在Java代理中包括自己创建的Java文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆