How can I run a single Java file through API code on my custom input?

I am creating a plugin which should compile a java file, run the generated .class file on input that I provide from a file, and then save the output to another file. But, I am unable to figure out a way to do this.

I found help for compiling the java file, but I still can't find a way to execute the .class file on a file input.

I asked about it on stackoverflow (here : ), but I am still not able to figure out how to execute the scratch file.
Can someone please help?




Please sign in to leave a comment.