简体   繁体   English

服务器不在 Eclipse 上运行

[英]Server does not run on Eclipse

I am developing a REST API with Java using Wildfly as a server.我正在使用 Wildfly 作为服务器开发 REST API 和 Java。 After installing JBoss Tools and configuring the Wildfly files, I create my server and go run it, but always get the same error:安装 JBoss 工具并配置 Wildfly 文件后,我创建了我的服务器并 go 运行它,但总是得到相同的错误:

 Error occurred during initialization of boot layer java.lang.module.FindException: Module java.se not found



  The server "WildFly 21" requires a JDK to run properly. The VM used to launch
 this server is not recognized as a valid JDK.
 C:\Users\jorge\AppData\Local\Temp\eoi7210.tmp\plugin\
org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped.win32.x86_64_15.0.1.v20201027-0507\jre

Besides, if instead of running the server I debug it, it ends up on a [Starting, Synchronized] state but I also get an exception:此外,如果我调试它而不是运行服务器,它最终会出现 [Starting, Synchronized] state 但我也得到一个异常:

Cannot connect to VM
Socket closed

And again:然后再次:

 Error occurred during initialization of boot layer java.lang.module.FindException: Module java.se not found

Thank you in advance to any of you that can give me a little help with this.提前感谢任何可以给我一点帮助的人。

Which Java do you use when running Wildfly?运行 Wildfly 时使用哪个 Java? The error indicates that some JRE is used while a full JDK is required.该错误表明在需要完整 JDK 时使用了一些 JRE。

Be aware you can install multiple versions of both JRE and JDK on a server, and the startup script will have to decide which of them to use.请注意,您可以在服务器上安装 JRE 和 JDK 的多个版本,启动脚本必须决定使用其中的哪一个。 Typically you can set the JAVA_HOME environment variable prior to invoking Wildfly.通常,您可以在调用 Wildfly 之前设置 JAVA_HOME 环境变量。

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

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