Errors starting out [message #1841629] |
Sun, 23 May 2021 21:25  |
Eclipse User |
|
|
|
I started a Dynamic Web Project using Java EE Perspective. I get the following errors, please see image attached.
|
|
|
|
|
|
|
|
|
Re: Errors starting out [message #1841764 is a reply to message #1841759] |
Thu, 27 May 2021 23:08   |
Eclipse User |
|
|
|
I'm unclear on what lead you to the conclusion that Java 8 was necessary, but installing a Java runtime onto your machine doesn't
automatically tell Eclipse about it. You need to add them on the Installed JREs preference page. Your project can refer to almost
any runtime version in the abstract, but Eclipse won't know any concrete class libraries to build against until you put what's needed onto
the Installed JREs preference page. The version of Java that's included in many downloads is sufficient to run Eclipse, but it
might not be enough to actually develop Java things against. And if you're developing in Java, always use a JDK.
For the first image, it's a matter of "jaxrs" being flagged by the Spell Checking. You can use Ctrl+1 with the cursor
in the word to remedy that message, or pursue other options through the Spelling preference page.
For the second image, I'm guessing it's the same as https://github.com/eclipse/lemminx/issues/1042 (LemminX being a Language
Server). The Dynamic Web Project is still the project type to use for Java-based web apps, and it doesn't tend to start you out with
a web.xml file that wouldn't pass basic XML validation.
The third image shows the message "Java compiler does not match the version of the installed Java project facet" , related to the
Project Facets property page shown elsewhere in the Properties dialog. The Facets indicate what features your project contains
and helps make sure you are deploying to a runtime that can support all of that. As I understand it (which could be wrong), changing
the Java facet version sets the project to try and build against that version of the JRE (pulled from what's in your Installed JREs
preference page) as well as sets the Compiler settings for the project to use that version of the language. I've not been the biggest
fan of tying these together, for multiple reasons of late, but the message is telling you that the value on the Project Facets property
page isn't the value set on your compiler settings. You can reconcile the discrepancy using either the Project Facets or Java
Compiler property page in the dialog you're showing.
I'm not sure what the fourth image is supposed to show, but I did change up the default paths in 2021-03 to make it easier to migrate
the project to use headless build systems later on. If you want the previous values, you just need to fill them in in the wizard that
creates the project. The new values aren't wrong, they're just different from the old values.
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.30230 seconds