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 : http://stackoverflow.com/questions/43658578/how-can-i-run-a-class-file-through-intellij-idea-api/43659846#43659846 ), but I am still not able to figure out how to execute the scratch file.
Can someone please help?

Thanks.

 

0

Please sign in to leave a comment.