+ 4
What is the role of environment variable in computer?
5 ответов
+ 6
Environment variable. Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer. They are part of the environment in which a process runs.
+ 4
think of them as dynamic "objects" on a computer that stores a value, which in turn can be referenced by one or more software programs running on a system. Environment variables help running programs (for example eclipse or IntelIJ Idea) know what directory to install files in, where to store temporary files, where to find user profile settings, and other things.
So, instead of manually telling your running program(s) Everytime where to find users settings/profile or where to store temporary files. Your program queries environment variables as needed.
imagine you've got 10 or more programs running and you have to manually provide configuration for all of them Everytime!!!
This concept kinda enforces the DRY(don't repeat yourself principle). set up your environment once, and every running program that needs one or more values from the environment will do the querying automatically.
- 1
it could link to any garbage store
- 3
java
- 5
l don't know