Tag Archives: Merge PDF error

easy-pdf-merge Error: java: command not found [How to Solve]

The phenomena are as follows:

Error: Command failed: java -jar  "/var/task/node_modules/easy-pdf-merge/jar/pdfbox.jar" PDFMerger "samplepdf1.pdf" "samplepdf2.pdf" "merged.pdf"
/bin/sh: java: command not found

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:198:13)
    at Pipe._handle.close (net.js:607:12)
  killed: false,
  code: 127,
  signal: null,
  cmd:
   'java -jar  "/var/task/node_modules/easy-pdf-merge/jar/pdfbox.jar" PDFMerger "samplepdf1.pdf" "samplepdf2.pdf" "merged.pdf"' }

Solution: java: command not found, install jdk to solve it, or configure the green version of jdk to environment variables