File as new File in Java?

Hi all I need te process a file in some custom java (dynamic created file, so a template would not fit). I use the Mendix “File manager” to upload the file to an entity that’s a generalization of ‘System.FileDocument’ How can I process this file in Java? Ideally I would like to use the ‘new File(“path”) ‘ in my custom java.   Thanks in advance
1 answers

AFAIK that is not possible directly because Mendix files are actually stored in AWS instead of the local file system. What you can do is copy the Mendix file content to a local temp file and use that instead. See this great post by Erwin for more details

To create a temporary file in java see

Note that temporary files are not automatically removed, you would need to delete them manually after you are done with them.

Hope this helps