node-java-caller
node-java-caller copied to clipboard
Java spawn error ENOENT inside Docker
Hi, I would like to ask about using java-caller. I deployed my app into a Docker container (OS Linux), and the jdk/jre required is successfully installed inside the container. However, it shows a spawn error as mentioned below:
Java jre or jdk 11 is required
Installing Java jre 11 in /home/support/.java-caller...
Installed Java jre 11 in /home/support/.java-caller/jre...
Java spawn error: Error: spawn java ENOENT
My node.js code implementing javaCaller is depicted here:
const java = new JavaCaller({
jar: 'myRunnableJar.jar',
minimumJavaVersion: 11,
maximumJavaVersion: 11
});
const {stdout, stderr} = await java.run([`--myArgs myValue`]);
I wonder if someone experienced the same issue, any favor and solutions will be appreciated, thank you!
@ainuraliyah i just release https://github.com/nvuillam/node-java-caller/releases/tag/v4.1.0 , do you still have the issue ?