I have an agent that needs an XML file to work with the api it uses… Usually (outside of notes) I would just include it in the package and it would work fine… The problem I am having is that I added it to the Project and put it in the Shared Resources\Files but I cannot get the agent to find it… There is no place in the Java to tell where the XML file is supposed to be (due to it being hard coded in api)… So does anyone know where I can place the file so that the Java agent will find it when it runs(For Testing and when it moves to the server)?
Is this file data on a hard drive somewhere? Just use it like any file, but either A) specify the full path or B) put it in the Domino directory, because that’s where Domino will look for it by default.- Is this file a JAR? I’ve never heard of adding data files to a Project, only class and jar files. If it’s configuration, such as log4j.xml, then put it in the Domino directory. I’m sure it’s possible to specify a different location, but it’s just easier to put it where Domino wants it and be done with it.
Instead of using file objects, use the Class.getResourceAsStream() to get to “resource” contents. A resource is very similar to a file, except that it’s location is related to where the java class files live.