I have a GlassFish/j2ee application, and I develop on one box, and production is a remote box. I have a function that makes files, and I need the files\' location to be diff
Put the information you need in JNDI - that's what it is designed for.
Consider letting your application refuse to do anything if the information is not there.