 | Level: Introductory Dan Kehn, Senior Software Engineer, IBM Lawrence Wright, Co-Op student, IBM
26 Jun 2007 Updated 17 Jul 2007 Building IBM Lotus Sametime on top of Lotus Expeditor lets you use Eclipse as a Plug-in Development Environment (PDE) to extend Lotus Sametime's functionality in many ways. This article, part 1 of a four-part series, explains the configuration steps to use Eclipse as a PDE for Lotus Sametime.
IBM Lotus Sametime V7.5.1 is an extensible instant messaging platform, not just a client, based on IBM Lotus Expeditor, the rich client platform for business applications. Lotus Expeditor is based on the Eclipse open source, plug-in model, rich client platform.
IBM Lotus Expeditor is IBM’s universal managed client software used to extend composite applications to laptops, desktops, and mobile devices. It can be used to extend IBM Lotus, IBM WebSphere, IBM Workplace, or Eclipse infrastructures. To keep the memory and disk footprint of Lotus Sametime small, it ships with a subset of the full Lotus Expeditor functionality.
Eclipse began as a Java-based, open source, extensible development platform that provides a framework and services for building a development environment using plug-in components. Basically, everything in Eclipse is a plug-in that the platform links together to create an application. As such, a Plug-In Development Environment (PDE) is included with Eclipse that allows you to develop your own plug-ins to extend the functionality of the Java IDE (Integrated Development Environment) or create your own applications. For instance, if you are a Java developer using Eclipse as an IDE and you consistently write the same type of program packages, then you can create a plug-in that extends the IDE to include a wizard that allows you to set up your packages with a common structure and components by clicking a couple of buttons.
This brings us to Lotus Sametime. Lotus Sametime V7.5.1 is built on the Lotus Expeditor platform and consequently on the Eclipse platform. As such, it takes advantage of the extensibility of Eclipse. You now can use the PDE in Eclipse with the Lotus Sametime V7.5.1 Software Development Kit (SDK) to add functionality to Lotus Sametime by creating your own plug-ins. For example, you can display the weather forecast under your Contacts list, or you can add a menu option for driving directions to someone's location when you right-click that person's name.
The Lotus Sametime SDK includes an Integration Guide that has instructions for configuring the Eclipse platform for plug-in development along with a Quick How To Guide for common extensions such as menu and toolbar items. Additionally the Lotus Expeditor Toolkit includes a Lotus Sametime development profile (referred to as client services in the PDE) that eliminates these setup steps. The Integration Guide also discusses some example plug-ins included in the SDK that can be referenced as starting points for plug-in development. This article series covers the steps necessary to create one of these samples, BuddyNote. These samples are helpful user tools in their own right, and you can use them if you like.
Before you start
This article series is intended for those with an interest in extending the capabilities of Lotus Sametime by developing plug-ins. You should be familiar with Lotus Sametime and its usage.
About this series
This four-part article series provides an introduction to Lotus Sametime V7.5.1 plug-in development using the Eclipse platform:
-
Part 1, this installment, guides you through the configuration of Eclipse for Lotus Sametime V7.5.1 plug-in development.
- Part 2 guides you step by step through the creation of a custom plug-in that extends the Lotus Sametime user interface.
- Part 3 demonstrates how to debug your plug-in using the tools that Eclipse provides.
- Part 4 shows you how to deploy a custom plug-in, allowing you to share your creations by setting up a Feature and Update Site project.
About this article
Before you can use Eclipse as a development tool to create Lotus Sametime plug-ins, you must configure it to recognize the runtime environment Lotus Sametime uses and point it to Lotus Sametime as a target platform for development and execution. This article guides you through this configuration in the following order, turning Eclipse into a Plug-in Development Environment (PDE) for Lotus Sametime V7.5.1:
- Install the J9 plug-in for Eclipse.
- Set Java compiler settings, J9 JRE setup, and Target Platform specification.
- Set up a launch configuration.
After these configuration steps are completed, your Eclipse workspace is ready for a plug-in project. You may want to save a copy of the workspace for use as a template when you start any future plug-in projects.
System requirements
The following applications and tools are required to perform this article:
Install the J9 plug-in
Lotus Sametime V7.5.1 includes the J9 JCL Desktop custom runtime environment, which supports most of the features of the J2SE 1.4.2 JRE. A developer version is included in the Lotus Sametime V7.5.1 SDK used in plug-in development.
The J9 JDT launching plug-in needs to be installed in order for Eclipse to recognize the J9 JCL Desktop as a valid runtime so you can compile, run, and debug your plug-in code. To install the J9 JDT plug-in follow these steps:
- If the Eclipse IDE is running, close it.
- Download the J9 JDT launching plug-in ZIP file from the link provided in the "System Requirements" section.
- Extract the contents of the downloaded J9 JDT launching plug-in ZIP file to the eclipse subdirectory in the directory where you installed Eclipse (for example, C:\eclipse32\eclipse).
NOTE: This is the directory containing the plugins folder and the eclipse.exe file. If you open the plugins folder after extraction, you should see the screen shown in figure 1.
Figure 1. Eclipse plugins folder with J9 installed
Set up the J9 runtime and target platform
With the J9 JDT launching plug-in installed you need to set up the J9 JRE that Eclipse uses to compile and run your plug-in code. You also need to make some changes to the Java compiler and target platform settings.
- In Eclipse, create a new workspace named Lotus Sametime751 using the Workspace Launcher, close the Welcome screen, and choose Window – Preferences.
- Select the General - Editors subtab, and select Text Editors. Select the Show line numbers option as shown in figure 2.
Figure 2. Preferences dialog box – Text Editors
-
Expand the Java entry in the left-hand column, and then select Compiler. Set the Compiler compliance level to 1.4, deselect "Use default compliance settings," and set "Generated .class files compatibility" and "Source compatibility" to 1.4.
- Verify that your screen matches the screen shown in figure 3 and click Apply. When you are prompted for a compiler rebuild, click Yes.
Figure 3. Preferences – Compiler
- Return to the Java entry in the left-hand column, and this time select Installed JREs as shown in figure 4.
Figure 4. Preferences dialog box – Installed JREs
- Click Add and enter the following settings in the dialog box that appears as shown in figure 5.
-
JRE type: J9 VM
- JRE name: JCL Desktop
- JRE home directory: <Root of the SDK>\ st751sdk\client\connect\j9-runtime\win32
- Default VM Arguments: -jcl:max
Figure 5. Add JRE Dialog
-
Click OK to return to the Installed JREs dialog box, and then select the configuration you just created (JCL Desktop). Click Edit to access the Edit JRE dialog box shown in figure 6.
Figure 6. Edit JRE dialog box – JCL Desktop
-
Click Add External JARs and browse to <JRE_HOME>\lib\jclmax\ext, where <JRE_HOME> is the JRE home directory specified in step 6. Select all the JAR files listed and click Open. The JAR files appear under JRE system libraries in the Edit JRE dialog box.
-
Click Add External JARs again and browse to <JRE_HOME>\lib\jclmax\opt-ext. Select all the files, and click Open to return to the Edit JRE dialog box.
- Verify that the Edit JRE dialog box looks like the one shown in figure 7, and click OK to return to the Installed JREs dialog box.
Figure 7. Edit JRE Dialog – JCL Desktop with JAR files added
-
In the Preference - Installed JREs dialog box shown in figure 8, select the JCL Desktop option to make it the default.
Figure 8. JRE selection
-
In the left column, expand the Plug-ins Development tab and select Target Platform as shown in figure 9. Use the Browse button next to the Location field to select the directory containing the Lotus Sametime executable.
Figure 9. Preferences - Target Platform
-
In the Target Platform dialog box shown in figure 10, select the Source Code Locations tab.
Figure 10. Target Platform - Source Code Locations tab
-
Click the Add button and browse to the plugins directory of the Eclipse 3.2 IDE installation (for example, C:\eclipse322\eclipse\plugins). Select the src directory of the four source plug-ins listed here and shown in figure 11:
- org.eclipse.platform.source.win32.win32.x86_3.2.2.r322_v20070119-RQghndJN8IM0MsK
- org.eclipse.platform.source_3.2.2.r322_v20070119-RQghndJN8IM0MsK
- org.eclipse.rcp.source.win32.win32.x86_3.2.2.r322_v20070104-8pcviKVqd8J7C1U
- org.eclipse.rcp.source_3.2.2.r322_v20070104-8pcviKVqd8J7C1U
Figure 11. Source code directories
-
Click OK to save the configuration.
Create a launch configuration
The last step you need to perform to configure Eclipse for Lotus Sametime plug-in development is to create a launch configuration. The launch configuration is used to run or debug your plug-ins using the Lotus Sametime V7.5.1 target platform you specified in the previous section.
- Choose Run - Run from the Eclipse menu to open the Run Configuration dialog box.
- Select Eclipse Application from the configuration list.
- Click the New icon.
- Provide a Name for the configuration, for example, ST 751.
- Select Run an application, and use the drop-down menu to select RTCApplication. Verify that the settings match those shown in figure 12.
Figure 12. Run dialog box
- Select the (x)=Arguments tab to the right of the Main tab, and enter the following under VM Arguments as shown in figure 13:
-Xint -Xtrace:none -Xgcpolicy:gencon
-Dcom.ibm.pvc.webcontainer.port=7777
Figure 13. (x) = Arguments tab
-
Click the Run button to see Lotus Sametime V7.5.1 execute. Exit Lotus Sametime, and you are ready to begin plug-in development.
Conclusion
This article, part 1 of a four-part series, outlines the configuration setup necessary to perform Lotus Sametime V7.5.1 plug-in development using Eclipse. In Part 2 you develop a custom plug-in called BuddyNote that extends the Lotus Sametime user interface, allowing you to create and store notes about the people in your Contacts list.
Resources Learn
-
Read part 2 of this article series, "Developing the BuddyNote plug-in."
-
Read part 3 of this article series, "Testing and debugging plug-ins."
-
Read part 4 of this article series, "Deploying plug-ins."
-
Read the IBM Redbook publication, "Extending Sametime 7.5 Building Plug-ins for Sametime."
-
developerWorks Lotus article, "Building an acronym expander plug-in for IBM Lotus Sametime V7.5.1"
-
developerWorks Lotus article, "Adding a dictionary facility to IBM Lotus Sametime Connect V7.5.1"
-
developerWorks Lotus article, "Setting up an IBM Lotus Sametime server sandbox environment for development"
-
developerWorks Lotus article, "Creating an update site for your IBM Lotus Sametime Connect plug-ins"
-
developerWorks Lotus article, "A tour of the IBM Lotus Sametime V7.5 toolkits"
-
developerWorks Lotus article, "Extending IBM Lotus Sametime Connect V7.5"
-
developerWorks Lotus article, "Extending IBM Lotus Sametime Connect V7.5 with an SMS messaging plug-in"
-
developerWorks Lotus article, "Designing a Google Maps plug-in for IBM Lotus Sametime Connect V7.5"
-
developerWorks Lotus article, "Extending the Lotus Sametime client with an LDAP directory lookup plug-in"
-
Resources for Eclipse developers on developerWorks.
Get products and technologies
Discuss
About the authors  | |  | Dan Kehn is a senior software engineer at IBM in Research Triangle Park, N.C. He has a broad range of software experience, having worked on development tools, such as IBM Rational Application Developer, and on operating system performance, memory analysis, and UI design. He is also co-author of the award-winning book The Java Developer's Guide to Eclipse. Currently, he is a technical enablement specialist helping business partners integrate their products into IBM Lotus Sametime Connect. |
 | |  | Lawrence Wright is a Co-Op student from North Carolina State University with a BS degree in Electrical Engineering. He is currently pursuing a BS degree in Computer Science. |
Rate this page
|  |