How to get a resource from a java agent in Lotus

In this post I explain how to get a resource, for example an image, from a java agent even if this file is not saved on the file system.
The agent is tested in lotus client 8.5.x.

  1. Create a java agent
  2. Import an image as a resource by using the button Import -> Resource
  3. Edit the class JavaAgent:

In the first example the image is converted to bytes (you need to import org.apache.commons.io.IOUtils and to import the relative .jar file under Archive)
In the second example the image is saved on the disk.

2 Replies to “How to get a resource from a java agent in Lotus”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.