I am working on a java program but i need to be able to have all users be able to access it without a properties file that i have. I want a way to host the properties file on a website so the java program clients can access it/ read it/ write to it. Is this possible? If so please explain
Share
If I understand you correctly:
You’ve got a Java application
You’re going to distribute the application to users, and users will execute it locally
… but …
You simply want your users to be able to access a global properties file from the web.
Is that correct?
If so, simply:
1) read the file with the Java URLConnection/stream class
2) use “properties.load()” as you would any other properties file – just use the URLconnection stream instead of a FileStream
‘Hope that helps
PS:
I would definitely have a local properties file – or set reasonable default values – as a backup, in case the user’s Internet connection is temporarily down.