Example project to run a Java Notes API application with Moonshine-IDE.
Required Dependencies:
- HCL Notes 11.0 or Higher
- Java 8 (currently required for Notes API)
- Gradle 5 or higher (current version supported by Moonshine-IDE is 7.5.1, also tested with 5.4.1)
Optional, but recommended:
By default, the Notes API will prompt you to authenticate through STDIN. To let Moonshine-IDE or a script execute the application, you will need to allow local applications to run without authentication:
- Open HCL Notes
- File > Security > User Security
- You will be prompted to authenticate
- Enable the "Don't prompt for a password from other Notes-based programs" checkbox
- Click OK
In order to run a Notes application from Moonshine-IDE (or other applications or IDEs), you need to give Full Disk Access permissions to both Moonshine and Java.
- Open System Preferences
- Open Security & Privacy
- Choose the Privacy tab
- Choose the Full Disk Access section
- Unlock the settings if this is not already done
- Enable the checkbox next to Moonshine.app and java. Note that there may be multiple "java" entries in this list for different SDKs that you use. You can add an entry manually with the "+" button.
If you do not feel comfortable with these permissions, you can run the application manually in Terminal.
Without this setting, you will see an error like this:
java.lang.Exception: Notes initialization failure - err 258
at lotus.domino.NotesThread.NnotesInitThread(Native Method)
at lotus.domino.NotesThread.sinitThread(Unknown Source)
at net.prominic.domino.vagrant.TestCatalina.main(TestCatalina.java:63)
Exception in thread "main" java.lang.NullPointerException
at lotus.domino.local.NotesReferenceQueue.decThreadCount(Unknown Source)
at lotus.domino.NotesThread.stermThread(Unknown Source)
at net.prominic.domino.vagrant.TestCatalina.main(TestCatalina.java:84)
With any of the methods below, you will see the application print the user ID name.
- Open the project in Moonshine with
File > Open/Import Project
or by double-clicking onDominoAPILocalExample.javaproj
. - Project > Run Gradle Command. This will run the default command
gradle clean runApp
- Open a Terminal
- If needed, change to the project path. You can copy the project path from Moonshine by right-clicking on the project and choosing
Copy Path
- Run
gradle clean build
- Run
sh RunJar.sh