<< IBM Connections application development state of the union - part 2 | Home | Developing plugins for IBM Notes on Mac >>

Developing code using IBM Notes in Eclipse on Mac OS

I'm cleaning out my drafts folder and stumbled unto this one I never posted. The steps has changed slightly after IBM Notes 9.0.1 for Mac was released as that release works fine with the never JVM's for the Mac. Actually there are very few steps you need to do to make the code work. To complete a standard console app that prints the username from the current session to stdout do the following:

  1. Write the code - could be something like this:
    import lotus.domino.NotesFactory;
    import lotus.domino.Session;
    import lotus.notes.NotesThread;
    
    public class Main {
       public static void main(String[] args) throws Exception {	
          NotesThread.sinitThread();
          Session session = NotesFactory.createSession();
          System.out.println(session.getUserName());
          NotesThread.stermThread();
       }
    }
    
  2. Run the code as a Java Application. This will fail as the JVM cannot load the required libraries.
  3. Edit the Run Configuration (click the dropdown next to the green run button and choose "Run Configurations...")
  4. Switch to the "Environment"-tab
  5. Add an environment variable called DYLD_LIBRARY_PATH with a value of "/Applications/IBM Notes.app/Contents/MacOS" (without the quotes)
  6. Click Apply and Run
This was done in Eclipse neon on Mac OS El Capitan (10.11) using Java 8.




Add a comment Send a TrackBack