I am creating a temporary file on a server that someone is uploading. While I was testing, it was good to use the full path to the home directory on my machine. But now that I have to deploy it to the server, I tried to use ~, but I get
java.io.FileNotFoundException: ~/test/csvFile.csv (No such file or directory)
how can I use something similar, for example, short for the home directory in * nix. I am using the java.io.File package.
Thank.
source
share