简体   繁体   English

eclipse上的Tomcat错误

[英]Tomcat error on eclipse

When I try to start tomcatv8 server on Eclipse I get this error:当我尝试在 Eclipse 上启动 tomcatv8 服务器时,出现此错误:

<b>Error: Could not create the Java Virtual Machine. </b><br>
<b>Error: A fatal exception has occurred. Program will exit.</b><br>
-Djava.endorsed.dirs=/usr/share/tomcat/endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable modules.

Any ideas of what's happening?对正在发生的事情有什么想法吗? by the way I am using Linux Fedora.顺便说一下,我使用的是 Linux Fedora。

It's a bug when you run Eclipse+Tomcat on Java 9:当您在 Java 9 上运行 Eclipse+Tomcat 时,这是一个错误:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=507338 https://bugs.eclipse.org/bugs/show_bug.cgi?id=507338

It was fixed in Java 9 but it reappeared in the Java 10.它在 Java 9 中得到修复,但在 Java 10 中再次出现。

I was having the same issue on my Eclipse IDE (with Tomcat 8.0 + Java ver_8.0)我在 Eclipse IDE 上遇到了同样的问题(使用 Tomcat 8.0 + Java ver_8.0)

SOLUTION:解决方案:

Step 1: Click on the little down-arrow besides the "Run" button, and click on 'Run Configurations..': CLICK ON 'Run Configurations..'步骤 1:单击“运行”按钮旁边的小向下箭头,然后单击“运行配置..”:单击“运行配置..”

// this will open Run Configuration window // 这将打开运行配置窗口

Step 2: Go to Arguments Tab:第 2 步:转到参数选项卡:

enter image description here在此处输入图片说明

Step 3: Remove the highlighted text "-Djava.endorsed.dirs="C:\\Tomcat9.0\\endorsed"第 3 步:删除突出显示的文本“-Djava.endorsed.dirs="C:\\Tomcat9.0\\endorsed”

Step 4: Click on Apply第四步:点击申请

Hooray!万岁! Hopefully, you may now see the Tomcat running on Eclipse.希望您现在可以看到 Tomcat 在 Eclipse 上运行。

<WORKED FOR ME!> <为我工作!>

I am here with another solid solution which fixed the issue, and now my Eclipse runs perfectly with Tomcat v8.0, without any errors!我在这里提供了另一个解决问题的可靠解决方案,现在我的 Eclipse 与 Tomcat v8.0 完美运行,没有任何错误!

Step 1: Download the Eclipse IDE from the following link.步骤 1:从以下链接下载 Eclipse IDE。 https://drive.google.com/file/d/1GU9MclLUqIGybaj2w4QfxRYmVSniFoNW/view?usp=drivesdk https://drive.google.com/file/d/1GU9MclLUqIGybaj2w4QfxRYmVSniFoNW/view?usp=drivesdk

FYI: The following processes/configurations may not work with a different version of Eclipse IDE仅供参考:以下流程/配置可能不适用于不同版本的 Eclipse IDE

Step 2: Download any version of Java from this link: https://www.java.com/en/download/第 2 步:从此链接下载任何版本的 Java: https : //www.java.com/en/download/

Step 3: Now, install JAVA and ECLIPSE IDE in your system.第 3 步:现在,在您的系统中安装 JAVA 和 ECLIPSE IDE。

Step 4: Make sure you have configured necessary things in "Control Panel > System > Advanced System Settings > Environmental Variables > ('System Variables' Section)" .第 4 步:确保您已在“控制面板 > 系统 > 高级系统设置 > 环境变量 >(‘系统变量’部分)”中配置了必要的内容。

If not, follow this link: https://www.google.com/amp/s/javatutorial.net/set-java-home-windows-10/amp如果没有,请点击此链接: https : //www.google.com/amp/s/javatutorial.net/set-java-home-windows-10/amp

Step 5: Now, configure Eclipse IDE to run Java EE if you didn't.第 5 步:现在,如果没有,请配置 Eclipse IDE 以运行 Java EE。

Follow this step by step instructions: https://drive.google.com/file/d/1GZs75X-_hkDQXkOFhIcXw3JDYFyFnsUv/view?usp=drivesdk按照此分步说明进行操作: https : //drive.google.com/file/d/1GZs75X-_hkDQXkOFhIcXw3JDYFyFnsUv/view?usp=drivesdk

Step 6: Setup Eclipse to run projects on Tomcat第 6 步:设置 Eclipse 以在 Tomcat 上运行项目

Follow this link: https://www.baeldung.com/eclipse-tomcat按照此链接: https : //www.baeldung.com/eclipse-tomcat

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

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