I have been using node.js for development. There is a situation in which I need to execute program written in Java. A simple class having a main function.By the way I have .java file with me. So what I need is to call a java program from Node.js app so that the program starts and do some calculations and then print it on screen. I need that processed value in some node.js variable so that I could use it in my node.js express app.
I've already seen some solutions suggesting child process, spawn and exec etc. But I have tried all of them and getting error. Some time ENONET error some time buffer error. May be it is due to the fact that answers are given for windows platform while I'm using Ubuntu OS. My Main.java file is residing on parent directory of node.js program. Need your valuable support.