Mindoo Blog - Cutting edge technologies - About Java, Lotus Notes and iPhone

  • Configure Eclipse 4.6.x with HCL Notes 10

    Karsten Lehmann  4 November 2019 16:06:07
    For years, whenever I needed to configure an Eclipse IDE for IBM Notes plugin development, I used Mikkel Heisterberg's instructions on his blog.

    Since I currently have a customer requirement to update an existing plugin that we built for them years ago to a newer Java version (1.8), I tried to set up Eclipse 2019-09 with HCL Notes 10.0.1FP2, but failed.
    The launching Client did not show any file/edit/view menus, probably caused by a ClassCastException I could see in the launch console.

    I guess the reason is that 9.0.1 FP10 brought a major update for the underlying Eclipse and OSGi platform.

    So I contacted HCL development and asked for the updated parameters to make this work again and quickly got a response that I would like to share with you.

    The document links to Eclipse Neon 4.6.3, but it's still working for me in Eclipse 2019-09 (4.13.0).


    1. Download Eclipse Neon (4.6.3) or later from link below:
    http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/3/eclipse-committers-neon-3-win32-x86_64.zip

    2. Get the latest V10 build

    3. Go to Windows => Preferences => Java => Installed JREs
    • Add => Standard VM =>
    • JRE home: [Notes Install path]\jvm, e.g. C:\Program Files (x86)\IBM\Notes\jvm
    • JRE name: “Notes JRE”
    • Select the JRE to point to this and Apply

    4. Go to Windows => Preferences => Plug-in Development => Target Platform
    • Add => default => Target Content
    • Name: “Notes Target”

    4a. In Locations Tab:
    • Add => Directory => Location => [Notes Install path]\framework\rcp\eclipse\plugins
    • Add => Directory => Location => [Notes Install path]\framework\shared\eclipse\plugins
    • Finish
    • Select the Target platform to point to “Notes Target” and Apply

    4 b. In Environment Tab:
    Please select following settings:
    • Operating System: win32
    • Windowing System: win32
    • Architecture: x86
    • Locale: en_US - English (United States)

    5. Go to Windows => Preferences => Run/Debug => String Substitution
    New => Add 2 strings (replace "xxxx" with the right plugin version!)

    5a. Name: rcp_home
    Value: [Notes Install path]\framework

    5b. Name: rcp_base
    Value: [Notes Install path]\framework\rcp\eclipse\plugins\com.ibm.rcp.base_10.0.0.xxxx

    OK
    Close this Preferences Window

    6. Put the following file inside the below plugin:
    [Notes Install path]\framework\rcp\eclipse\plugins\com.ibm.rcp.base_10.0.0.xxxx

    rcp.security.properties


    7. Open Debug Configurations in the ‘Debug Perspective’ => Eclipse Configuration => New
    7a. In the Main tab:

    Name: NotesDebug
    Program to Run =>  Run a product => com.ibm.notes.branding.notes
    Java Runtime Environment => Runtime JRE => Select “Notes JRE” i.e. the one we added in step 3

    7b. In the Arguments tab:

    Program Arguments:
    -clean -console -debug -log -personality com.ibm.rcp.platform.personality -config notes

    VM Arguments:
    -Xquickstart
    -Xss384k
    -Xshareclasses
    -Drcp_home="${rcp_home}"
    -Drcp.install.config=user
    -Dosgi.install.area="${rcp_home}\eclipse"
    -Disa.ignoreESR=true
    -Dcom.ibm.pvc.osgiagent.core.logfileloc="${rcp_home}\rcp"
    -Dcom.ibm.pvc.webcontainer.port=0
    -Declipse.pluginCustomization="${rcp_home}\rcp\plugin_customization.ini"
    -Djava.security.properties="${rcp_base}\rcp.security.properties"
    -Declipse.registry.nulltoken=true
    -Djava.protocol.handler.pkgs=com.ibm.net.ssl.www.protocol
    -Djava.util.logging.config.class=com.ibm.rcp.core.internal.logger.boot.LoggerConfig
    -Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook
    -Dosgi.framework.extensions=com.ibm.rcp.core.logger.frameworkhook,com.ibm.rds,com.ibm.cds
    -Xbootclasspath/a:${rcp_base}\rcpbootcp.jar;


    8. Apply => Debug – This will launch your Notes in Debug mode.
    Ensure that whenever you launch the Notes from Eclipse, there should be no other instance of Notes already running. If so, please close Notes and then launch from Eclipse to debug.

    Comments

    1Karsten Lehmann  05.11.2019 11:18:08  Configure Eclipse 4.6.x with HCL Notes 10

    Update:

    The rcp.security.properties file is taken from an older setup document and does not seem to work properly (got a NullPointerException here). Please skip copying the file to com.ibm.rcp.base_10.0.0.xxx until I have replaced the file.

    2Karsten Lehmann  05.11.2019 14:57:45  Configure Eclipse 4.6.x with HCL Notes 10

    Ok, rcp.security.properties download has now been refreshed with the right version.

    3Julian Robichaux  08.11.2019 23:48:20  Configure Eclipse 4.6.x with HCL Notes 10

    Thank you!

    A few things that are different for me:

    1) For the VM arguments, if Notes is installed in a folder with spaces in the name (like Program Files), the last line will need to be surrounded with quotes, like:

    "-Xbootclasspath/a:${rcp_base}\rcpbootcp.jar"

    2) In the debug configuration, I set the Configuration File location (on the Configuration tab) to:

    ${rcp_base}/config.ini

    I'm not sure if that's required or not.

    3) If you have a fixpack installed, you might need to go through the list of plugins in the Target Platform configuration and uncheck all the old/duplicate versions of plugins -- because when you install a fixpack, the old plugins don't get deleted (and you'll get errors when you launch the debug session if there are duplicates). I have no idea if there is a way to automate this or not. I wish there was, because it's terrible to go through 1000 plugins and uncheck the duplicates.

    4Karsten Lehmann  09.11.2019 1:40:59  Configure Eclipse 4.6.x with HCL Notes 10

    Hi Julian!

    Thanks for the comment.

    Some comments:

    1) Looks like I forgot to change that line. The HCL documentation did not contain any quote characters and I had added them manually in the blog article (copied the arguments from the document, not from Eclipse).

    2) I am using C:\Data\workspace\.config\config.ini here, c:\Data is my Notes Client data directory. Since that parameter was not part of the HCL documentation, I thought that might not be necessary.

    3) Did the same terrible work, unchecked lots of duplicate/old plugin versions. Again, since that was not part of the HCL documentation, I thought it might not be necessary anymore, but I also did not want to re-enable all of them to check this and do all the work a second time :-).

    The document I got from HCL contained 9.0.2 version numbers BTW.