I need to create a file and use the path to that file in the application. The problem is that there is no permission to create a file in the current directory.
I am testing my application and my current directory is /opt/development/appX/bin
I can not create a file in the bin directory. I can change the directory to some other directory where I have the permission, create the file there and use it, but this is because I know the directory structure of my system.
What if I do not know the structure of the system? It could be Linux/Windows, directory names could differ. Is it possible to find a place in the system, create a file there, use it and then delete when done? I need some Java code to allow me to create a file anywhere so that I could use its path. Is there a correct way to do that?