Hidding the design of a database and accessing resources

Hello,I have written an imported java agent that shows some java frames and loads some images from resources. There are two possibilities : to load them using getResource (that should theoreticly load them from imported files) and the second one is to scan NoteCollection, get proper image documents, export them to xml, get gif data, and decode it (base64).

Now basicly second way works perfectly only when the design is not closed. After closing it errors appears. Dxl exporter cannot shows some errors. It is strange, because I can access content of fields from java, but I cannot export them ?

Is there any way to pass this problem ? (or maby is there a way to access files imported to java agent - the ones that are not *.class files) ?