Who says blogging is a waste of time ? What a great example right here. You may remember that on Monday I blogged about my first Lotus Notes 8.5 application for the Mac. Now, I originally started this project last summer! That's right over 6 months ago. When I hit the roadblock that I documented on Monday, I quickly started to search the web. Nothing turned up an answer. Since Notes 8.5 was still in beta at that time, I decided to abandon the effort.
When Notes 8.5 shipped earlier in the year, I thought it would be a good idea to pick up the project again. I knew that if I hit a roadblock, I could get official support. Well, as I said earlier this week, I was stuck because I couldn't call the Notes API from my SWT Java program. At that point, I blogged about my status, and quickly summarized what I had done up until that point. I also noted that I had opened an IBM Support ticket and was waiting for assistance.
And then magic happened! 1 hour and 22 minutes after I posted the blog, the answer came to me!!! Karsten Lehmann, one of the developers for MindPlan, kindly posted a comment detailing that he had gone through the same issue. He suggested a couple of things, I responded back and voilá!
Here's how I configured Eclipse to run my SWT Java application for Notes in my Mac OSX Leopard:
- Under Arguments, added the following VM Argument: -Djava.library.path=/Applications/Notes.app/Contents/MacOS
- Under JRE I selected Java 1.5.0 (for some reason it wouldn't work with Java 1.6)
- Under Environment I added 3 environment variables:
- PATH -> /Applications/Notes.app/Contents/MacOS
- LD_LIBRARY_PATH -> /Applications/Notes.app/Contents/MacOS
- DYLD_LIBRARY_PATH -> /Applications/Notes.app/Contents/MacOS
At this point I could get my application running beautifully under Eclipse, but I couldn't run it as a stand-alone application. Time to do some more searching!! After a couple of days, I finally figured it out. First, Eclipse includes a really cool feature that lets you export your Java applications as Mac Bundles.
Next, because of the way Mac works, I had to set the DYLD_LIBRARY_PATH environment variable first, before running my application. Therefore, I had to create the file ~/.profile with the following line:
And now, IBMers can use Atlas from their Mac computers!