Hi all,
I am running a Java program on a Linux server in which I read in a base directory path from the *.properties file. During processing, I build a unique file name and create a file to save data, concatenating the directory path and the file name. Works fine, except that I now need to modify this code to accept an environment variable as part of the directory path (previously it was uniquely specified). I've experimented with various ways of quoting - no luck. I'm sure there's a simple syntax to permit this, but so far I've been unable to find it.
File creation statement looks like this:
File uploadFile = new File\(baseDir \+ newFileName\);
where baseDir has been read in from the properties file and is equal to
$MYFILEDIR/reports/
The file creation is failing.
Can anyone tell me what syntax can I use in the input that would allow me to create the file in the expected directory? Thanks so much.