Steps followed :
Took a back of my lotus notes as sample.nsf
And then tried to read the attachments from the sample.nsf
Cod
Easy way to get all the attachments from Lotus Notes using Java.
Document doc = dc.getFirstDocument();
for(var att :session.evaluate("@AttachmentNames", doc)){
if (att == null || att.toString().isEmpty()) {
continue;
}
EmbeddedObject eb = doc.getAttachment(att.toString());
System.out.println(eb.getName());
System.out.println(eb.getFileSize());
eb.extractFile("a.txt");// give file name what u want
}