I have a p12 file upload function with the following code:
-
Then I want to create a function to delete the p12 file with the following code:
-
And when I run the result there is an error:
java.nio.file.FileSystemException: C:\p12\dummy.p12: The process cannot access the file because it is being used by another process.
Is there a way for the file to be deleted successfully?
UPDATE : I've found the problem, apparently because the p12 file is used in this function:
-
Is there a way to still be able to delete the p12 file?