Firstly I' like some help to edit the question because I can't explain my self properly.
Straight up, I have an application that receives files through socket connection and then saves them in the computer. The problem is that this application runs as a .jar file, and I don't know what file directory to use at the FileOutputStream()
method. I am currently using the "C:\Users\My_User\Desktop\My_Project..." directory, but this is not affordable once many clients will use this and the directory may get lost depending on the client (some of them might be Linux as well).
How can I save the files at the same place where the .jar is, without having to write the whole Windows directory?
Thanks, since now