1

When I try to start tomcatv8 server on Eclipse I get this error:

<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.

person
  • 458
  • 3
  • 16
  • 1
    Possible duplicate of [Tomcat 7.0.73 doesn't work with java 9](https://stackoverflow.com/questions/45917401/tomcat-7-0-73-doesnt-work-with-java-9) – Pavel Molchanov Jul 17 '18 at 15:59

3 Answers3

2

It's a bug when you run Eclipse+Tomcat on Java 9:

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

It was fixed in Java 9 but it reappeared in the Java 10.

Pavel Molchanov
  • 2,299
  • 1
  • 19
  • 24
1

I was having the same issue on my Eclipse IDE (with 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..'

// this will open Run Configuration window

Step 2: Go to Arguments Tab:

enter image description here

Step 3: Remove the highlighted text "-Djava.endorsed.dirs="C:\Tomcat9.0\endorsed"

Step 4: Click on Apply

Hooray! Hopefully, you may now see the Tomcat running on Eclipse.

<WORKED FOR ME!>

Nirmal
  • 57
  • 1
  • 8
0

I am here with another solid solution which fixed the issue, and now my Eclipse runs perfectly with Tomcat v8.0, without any errors!

Step 1: Download the Eclipse IDE from the following link. 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

Step 2: Download any version of Java from this link: https://www.java.com/en/download/

Step 3: Now, install JAVA and ECLIPSE IDE in your system.

Step 4: Make sure you have configured necessary things in "Control Panel > System > Advanced System Settings > Environmental Variables > ('System Variables' Section)".

If not, follow this link: 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.

Follow this step by step instructions: https://drive.google.com/file/d/1GZs75X-_hkDQXkOFhIcXw3JDYFyFnsUv/view?usp=drivesdk

Step 6: Setup Eclipse to run projects on Tomcat

Follow this link: https://www.baeldung.com/eclipse-tomcat

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
Nirmal
  • 57
  • 1
  • 8
  • Why download Eclipse from that link instead of one of the packages from https://www.eclipse.org/downloads/packages/? Also, it seems that the actual instructions is in a drive.google.com file. Which means that this Answer is not very useful on it's own. Why not add the instructions here? (Note: I didn't go to the drive as I'm not comfortable clicking on those links.) – Scratte Mar 15 '21 at 12:43