easy-pdf-merge报错(例如java: command not found)解决方法

Posted 秋9

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了easy-pdf-merge报错(例如java: command not found)解决方法相关的知识,希望对你有一定的参考价值。

现象如下:

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"' 

解决方法:java: command not found,安装jdk就可解决,或者把绿色版本jdk配置到环境变量中

以上是关于easy-pdf-merge报错(例如java: command not found)解决方法的主要内容,如果未能解决你的问题,请参考以下文章

java new object.method() 为啥不报错? [关闭]

win10正式版配置java报错 为啥?如何解决

java String怎么可以包含多个双引号不报错

kettle5.3 Java调用资源库中的转换报错

Java子类加static不报错,不加无法解析类型?

调用Http get 接口报错:java.lang.IllegalArgumentException: Illegal character in query at index 解决办法