This week I did research on environment variables in Java on a Windows system. Let me create a scenario for you: we are creating a Java program where a file is uploaded and then is saved some where on your personal computers directory (somewhere being a specific place you would like to save it to).
In order to do this you need to use environment variables so that users can change where they would like the file to be saved.
In your java program you will use the line of code:
Now you need to create an environment variable with the same variable name you used in the previous code snippet.
In order to create a new system variable follow these steps:
set Variable "C:\%USER%\Value" -m