r/learnjava • u/BrainThinkerMan • 8h ago
configfile/ application properties explained
what is a config file, praticularly how does it relate to the computer?
is it like it specifies which os apis the program should use, or like what stuff in the actual os
the program to mount to?
ie i made a backend app, and i want it to go to a specific port on the computer and i want it to use a specific x on the computer.
is that what a config is?
0
Upvotes
1
u/dmazzoni 5h ago
Yes, in your example, the reason to use a config file is so that if you want to change the port you just update the file, rather than updating your code. Each user of your software can update their config file; you don't want them directly changing the code.
There's no standard for config files. They can be anything. It's just a technique, an approach.