If you strictly adhere to the specification, you cannot download files from a server application. You need to either load it using the class loader or add the configuration to the database.
Class loader
Classloader is the utility responsible for loading bytecode from files, URLs, or other places into memory, where the Java runtime can use it to create classes. Thus, classloader is the interface between java-vm and some repository. Classloaders hide the details of access to resources, so you can load resources regardless of whether they are in a file or in other places. On the application server, java wants you to not assume that there is an available file system (your classes can come from somewhere else) and load resources exclusively through class loaders.
But, of course, somewhere on the stack, the class loader does access the file system, so the question is how to configure this connection. Here it gets hairy because there are several class loaders on the application server (at least one for each application), and it is not safe to make any assumptions about how they are structured. There are two options: - You typically have your application packaged in a war or ear file containing classes and jar files. You can put your .properties file along with these classes and load it through the "local" class loader ("local" in quotation marks because this is not a real time limit, and as I said, you cannot make any assumptions here). - since this means that every time you want to change the settings, repack your war / ear file, it is not much easier than re-creating your application. An alternative is to create your configuration file for the system class loader defined at startup. This is set up by the CLASSPATH environment variable (usually in bat / cmd / sh-script, responsible for running weblogic, as others have mentioned). So what do you do: create a directory for configuration files, add it to CLASSPATH in the startup script, load the following code (untested):
you can load properties from this input stream just like files.
Database
An even more reliable route would be to save all your configuration in a database and load it through the DataStore using JDBC. However, there is no default API to load from the database into the Properties object, so you will need to do this yourself.
A simple design will have a database table as follows:
CREATE TABLE config ( key varchar(255) primary key, value varchar(255) )
The code for parsing this property object remains as an exercise for the reader (I think Google can tell you if someone did something like this)