How to add my java code in Java Action

0
Hello Guys, I have below java code which I want to integrate to my java action which will be called by Microflow, Is it possible? Please help me on this. Thanks in Advance. public class FindAllFiles { static void RecursivePrint(File[] files, int level) { for (File file : files) { if (file.isFile()) System.out.println(file.getName()); else if (file.isDirectory()) { RecursivePrint(file.listFiles(), level + 1); } } } public static void main(String[] args) { String mainFolder = "D:\\2020"; File maindir = new File(mainFolder); if (maindir.exists() && maindir.isDirectory()) { File files[] = maindir.listFiles(); RecursivePrint(files, 0); } } }  
asked
2 answers
3

Here is the how-to and reference guide on using Java actions with Mendix:

https://docs.mendix.com/howto/logic-business-rules/extending-your-application-with-custom-java

https://docs.mendix.com/refguide/java-programming

The examples should help you, and feel free to ask specific questions in a new thread if you get stuck!

answered
0

Hi,

Adding one more documention which explains in detail about parameters used in java action

https://docs.mendix.com/refguide/java-actions

https://www.youtube.com/watch?v=PZ718BAUPmU

answered