简体   繁体   English

Netbeans 12.0 + Payara micro 5 + OpenJDK 11 不部署war文件

[英]Netbeans 12.0 + Payara micro 5 + OpenJDK 11 does not deploy war file

I'm writing a Jakarta application using我正在使用

  • Netbeans 12.0 Netbeans 12.0
  • Payara micro 5.2020.7 Payara 微 5.2020.7
  • OpenJDK 11开放JDK 11

The problem: The IDE does not deploy the war file if the app use问题:如果应用程序使用 IDE 不部署war文件

<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

Netbeans 不使用 11 源和目标进行部署

But if the app use但如果应用程序使用

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

The IDE deploy the WAR file successfully:v IDE成功部署WAR文件:v

WAR部署成功

I think that the Payara Netbeans plugin have an error working with JDK11 because if I run mvn payara-micro:start payara-micro:stop at a simple terminal all is ok (the WAR file is deployed successfully).我认为 Payara Netbeans 插件在使用 JDK11 时出错,因为如果我在一个简单的终端上运行mvn payara-micro:start payara-micro:stop一切正常(WAR 文件部署成功)。

从终端运行一切正常

Some idea that what happened?有些想法,发生了什么?

An unexpected error.意外错误。 JAVA_HOME has been configured correctly, Netbeans Platforms too, but OS alternative for java has a wrong value configured. JAVA_HOME 已正确配置,Netbeans 平台也已正确配置,但 java 的操作系统替代配置了错误的值。 The solution:解决方案:

配置java替代

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM