I have a node.js application where I'm trying to run a jar file and get the result. I succeeded using this code.
var exec = require('child_process').exec;
var child = exec('java -jar ./helloworld.jar',
function (error, stdout, stderr){
console.log(jardata,"jar out...");
if(error !== null){
console.log("Error -> "+error);
}
This works well in my local system. But when I do a cf push of this app to Bluemix, the app gets deployed, but gives me a java: not found error when it is trying to run the jar file. Is it possible to install java within the node.js application? Or how can we do this on Bluemix running a jar within a node.js application? Any help appreciated!!