Does anybody know how to use Java classes created as “Code/Java” design elements (provided in 8.5.3) in Java agents? I need to share some code between foreground (XPages) and background (agents).Experimenting with “Java build path” in Domino Designer (Eclipse-based) I have found this:
-
open the agent source code and put the cursor there (in the tab JavaAgent.java);
-
press “Project - Properties - Java build path”;
-
in the dialog in the tab “Libraries” press “Add class folder” and select the folder “WebContent/WEB-INF/classes” in the project structure. Then press Ok.
Now all imports of packages and class names defined in “Java/Code” become valid in the agent code. However, when the agent is saved and then reopened it becomes invalid again.
And the folder WebContent/WEB-INF/classes is unavailable outside the tab “JavaAgent.java” so it cannot be added to the project properties permanently.