Good day! I did a servlet in IDE Eclipse, but I got this problem after creating a new Dynamic Web Project (File / New / Dynamic Wev Project).
I see this in Markers:
"The project was not built due to "Failed to init ct.sym for C:\Program Files\Java\jre-10.0.2\lib\jrt-fs.jar" in IDE Eclipse"
My servlet does not want to build. There is a java-file, but no class-file after building. I deleted, created, cleaned my project. Later I deleted and added Tomacat-server. Java EE is intalled.
No result. Google can`t help me.
Please, help me to solve this trouble...
Whenever you create the java project using eclipse, you have 3 choices given which are,
Try to select the third choice.
Not sure if you've solve the problem or not but I just wanted to help since I was having the same problem just now.
solution::
1.
Preference > Installed JREs > add > standard VM (not sure but works) > Directory > go to where you download your java (eg:G:\Java\jdk-15.0.1) > Finish
2.
Preference > Installed JREs > execution environment > JavaSE-15 > choose jdk-15.0.1 > apply
3.
Create your Java project.
PS::
I used user14235983 's method before, it worked, but using this would cause a problem of not showing the documentation of the functions (in my case).
So I checked the library again. It seemed like there is something wrong with the path. So I tried to change it. And then it worked. And I came back here, look through Myth_Star & GokulnathP 's answer again, I found that we are using the same method.
In your question, it seems like you have the correct path. (So I am not sure whether we are having the same type of problem.) Maybe its because you are using "\Java\jre", but I am using "\Java\jdk". Else maybe try to reinstall your Java.
I also had the 'Failed to init ct.sym for ..../jrt-fs.jar ' error in Eclipse 2021-03 with JRE from OpenJDK11 in a new Java project. For me the fix was to disable the "Use '--release' option" in the "Java Compiler" section of the project properties.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With