node-java-caller icon indicating copy to clipboard operation
node-java-caller copied to clipboard

Java spawn error ENOENT inside Docker

Open ainuraliyah opened this issue 2 years ago • 1 comments

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 avatar Jul 18 '23 07:07 ainuraliyah

@ainuraliyah i just release https://github.com/nvuillam/node-java-caller/releases/tag/v4.1.0 , do you still have the issue ?

nvuillam avatar Aug 20 '24 20:08 nvuillam