Just lately I've been doing an inordinate amount of Java coding in Domino Designer. Which, for the most part, I'm really enjoying. I'd much rather it were C# and Visual Studio, but hey, it's work and I shouldn't complain.
At some point recently I upgraded my Notes client to 8.5.3 and then some time later I noticed a new design element appeared under the Code section in Designer, as below:
Inside this new area you can directly create and modify classes, like so:
This appeals to me as I find the way Java code is currently stored in Script Libraries a bore. The way you have to save not only your Java source but then also the Library itself. Huh? Same goes for Java Agents!
My hope was that the new Java design element would do away with some of the hassles of using Java and Domino, so I gave it a try, but soon got confused and gave up on it as a new and buggy feature not to be trusted (for now).
I created a simple class called Test in the net.codestore; package.
Then in a standard Java Agent I tried to import the package, but it wouldn't resolve it.
One of the solution is suggested was to try and fix the project settings and add the database itself to the build path for the Agent. Huh?
This seems to work. Kind of. The package can then be found be the Agent but you can't create an object based on the Test class. And then when you save and re-open the Agent the reference breaks again.
Here's a snippet from the What's New page for 8.5.3 (emphasis my own):
JavaÔäó design element -- This release offers a Java design element to make it easier to use Java in Domino applications, particularly in Domino XPage applications. This design element let you create a single Java class that is scoped to the actual NSF project itself. This Java file is then directly callable by code in XPages. Previous to this release, you had to put these files manually into the NSF. The introduction of this element makes the use of such files easier and more prescriptive. The idea behind this element is to let you use the normal Eclipse user interface for the Java element wherever possible.
Does this mean it's only for XPages? If so then boo. If not what am I missing or doing wrong?