Pages

Monday, February 16, 2009

Developing Java Applications for Lotus Notes on the Mac

View Comments

This week I've been working on creating my first Java application for Lotus Notes v8.5 on the Mac. Now you may be asking how this can be my first Java application for Notes on the Mac since I already hacked Lotus Notes to include the Activities sidebar. While that is a Java application, it's not one that I created and second it's really an Eclipse plugin that runs inside of Notes. What I'm trying to do is create a Java application that runs outside of Notes, yet queries Notes for information.

So what am I doing? Well, as a side project, I decided to port the code for Atlas to the Mac. The Atlas client is just a Java SWT application, so how hard could it be?

Deploying SWT applications in the Mac

The first step was to figure out how to actually get an SWT application running on the Mac. The folks at Eclipse have already documented this process and it's pretty straightforward. The key is to put in the SWT libraries for the applicable platform. Therefore, I removed the swt.jar and related DLLs from the Java application and put in the Mac OS X SWT.jar and libraries.


200902132207.jpg

Troubleshooting SWT applications in the Mac

Double-clicking the application, didn't do anything. Time to troubleshoot! I downloaded and installed Eclipse 3.4. Running the application from within the Eclipse environment shed some light on the problem: for some reason the Notes libraries could not be loaded by the Java Virtual Machine (JVM). I posted a question about my problem in the Lotus Notes 8.5 forum and hope someone can provide an answer. Additionally, I've opened a PMR to get official help from IBM.

How It Looks

To prove that it was just a Notes issue, I commented out all the code calling the Notes APIs. I recompiled, ran it and saw the following.


200902132221.jpg

So I'm almost there... as soon as I can figure out why I can't call the Notes APIs from my standalone Java application, I should be golden! Isn't Java great ?

blog comments powered by Disqus