This section describes how to install Eclipse, and set it up as a KEEP API development environment.
Note: Eclipse is a popular choice for IDE as it has a rich and extensible feature set, and is familiar to many team members. That said, since KEEP is Maven based and built from the command line, it does not require any one IDE. Other choices worth investigating include:
Begin by downloading and installing the 64 bit version of Eclipse from Eclipse.org. Use the offical downlaods page to get your version
Once you have Eclipse properly installed, select: File / Import… from the top level menu to bring up the Import dialog:
1) Select Existing Maven Projects as shown above and click Next.
2) Click the Browse… button and select your domino-keep directory, and click Finish to import it. You should now see the KEEP source code in your Package Explorer.
If you haven’t already, take a moment now to install the OpenJdk version of Java 8. Instructions are here:
You will need to setup two versions of Java for your development environment: To Run KEEP successfully the Notes or Domino JVM is required. To run a successful Maven build, the Domino JVM is insufficient, since Maven requires a true JDK, as found in OpenJdk 8.
For Eclipse it could look like this:
Once you have a Debug Configuration properly set up, it is very easy to debug KEEP APIs within Eclipse.
To get started, select Run \ Debug Configurations… from the top menu.
Next right click on Java Application and select New Configuration:
1) Give your configuration a name, KEEP Server in this case, and set Project to com.hcl.domino.keep and Main Class to com.hcl.domino.keep.Launch
2) Switch to the Arguments tab and provide the following arguments (one per line)
Set the Working directory to your Notes DATA directory (And if your data directory on Windows is below
Program Files... or on Linux below
/opt a kitten must die each time you launch!)
3) Switch to the JRE tab and select Alternate JRE. Select the Notes 11 JRE you created above from the dropdown list. (Using the Notes 11 JRE will allow Eclipse to resolve Notes and Domino classes.)
|![Debug Configuration 3](‘/assets/images/DebugConfiguration3.png’||relative_url }})|
4) Now switch to your Classpath tab. You should see a layout like the one below, with the Notes 11 JRE on your classpath.
|![Debug Configuration 4](‘/assets/images/DebugConfiguration4.png’||relative_url }})|
5) Next switch to your Environment tab, and enter the environment variables shown below. Of course you will need to adjust the Notes path to match your system.
NOTE Entries are CaSe SeNsItIvE
When you have a valid SSL cert, you also might need
5) When you’re done, remember to hit Apply, and you should be good to go.
6) When you wish to start debugging, select Run \ Debug Configurations… from the top menu. Make sure your KEEP Debug configuration is selected (KEEP Server in this example), and press Debug to begin debugging. If you’ve done everything correctly you should see Domino KEEP API open for business at the bottom of the console window.
Note There is a separate setting for debugging a KEEP server in a container.
Before you use Eclipse to edit and submit code, you should import two XML files that help to enforce good coding practices.
1) Select Window / Preferences from the top level menu.
2) In the Preferences dialog, select Java / Code Style / Clean Up.
3) Next select the Import button in the right panel and import CodeCleanupSettings.xml from your domino-keep directory.
4) Make sure stw.default is now set as your active profile.
5) Now select Java / Code Style / Formatter and import eclipse-java-google-style from your domino-keep directory.
6) Make sure GoogleStyle is now set as your active profile. Click Apply and Close to save your settings.
Now the next time you edit a Java file, you can take advantage of four commands on the Source menu:
Correct Indentation: Control I
Format: Control Shift F