Just to confirm, in your action did you get the path by using this function: Core.getConfiguration().getTempPath()
in the folder provided by this function you should be able to write your image without any issues.
In my program, I now have
File PieChart = Core.getConfiguration().getTempPath();
ChartUtilities.saveChartAsPNG(PieChart, chart, width, height);
It is creating a file path called PieChart and using a java charting library to write to the folder. It should let me write to the folder, I looked at the security.policy doc and it says it has no restrictions, but it is still not letting me write to this folder. It returns the error below:
com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Users\Monique\Documents\JavaExtension-main_2\deployment\data\tmp" "write")
Does this have something to do with this being a png file I am trying to write, or maybe Mendix is not allowing me to use this charting library to write to this folder. It works fine in eclipse, but not in the Mendix application. Any suggestions would be helpful. Thank you.