I have a problem, I can't read the output of my shelljs command (which executes java) while the command is running. I don't know if it's clear, but basically I want to have the output of this shelljs command as soon as it appears and not once the java program is finished. Thanks in advance for your answer.
process = shell.exec('exec java.......', {async: true}, function(code, stdout, stderr) {
//Here I need the output
console.log('Exit code:', code);
console.log('Program output:', stdout);
console.log('Program stderr:', stderr);
});