5
I am developing an application that works with files (save and upload) and have to work with system variables to determine where to save these files.
My question is: Is there any way to use variables independent of the operating system? If so, how should I proceed. For example, I know that if I put a variable caminho
, for example in windows as follows:
%caminho%\algum_dir\algum_arquivo.exemplo
He will convert %caminho%
for the string contained in this variable. The same goes for Linux, only using $caminho
. So, in short, I wanted to know if it is possible to use some kind of nomenclature for the program to detect an environment variable, which has a name defined by me, independent of the OS, since the program will be in Java.