M
Martin Gregorie
I have a configuration file intentionally buried in a jar file I'm
building (and a tool to amend it before you ask). This is all working
correctly but could possibly have been done better.
Yesterday I searched for documentation on doing this type of thing but
couldn't find anything in the standard Java 6 documentation.
Embarrassingly, I can't even find the description of how to set it up
that I used in the first place. I'm probably missing something obvious,
so pointers on where to find this information would be most welcome.
The reason I need the documentation: I can write code that uses an
InputStream to read the configuration file provided its in the same
package as the class that reads it, but would prefer to put the file in
the root of the jar file. Is it mandatory for the file to be in the same
package as its reader or is there a way of accessing it when its placed
elsewhere?
building (and a tool to amend it before you ask). This is all working
correctly but could possibly have been done better.
Yesterday I searched for documentation on doing this type of thing but
couldn't find anything in the standard Java 6 documentation.
Embarrassingly, I can't even find the description of how to set it up
that I used in the first place. I'm probably missing something obvious,
so pointers on where to find this information would be most welcome.
The reason I need the documentation: I can write code that uses an
InputStream to read the configuration file provided its in the same
package as the class that reads it, but would prefer to put the file in
the root of the jar file. Is it mandatory for the file to be in the same
package as its reader or is there a way of accessing it when its placed
elsewhere?