How to install jre 8
(2) Select 1.4 for the JRE version.Īgain on the top left, search for “build path” and (referencing screenshot below): (1) Uncheck “Use compliance from execution environment…” (normally you would leave this checked, but again, we are just demonstrating the errors that will arise when the JRE versions in project settings don’t agree). Type “compiler” in the search box, and click on Java Compiler in the left hand side. (Meaning, make sure that checkbox is checked, which it should already be.) (2) To emphasize what the Eclipse documentation says, if we turned off the Dynamic Web Module facet, we would not being able to “Run on Server” with this project. (1) Make sure the Java facet is checked, and then change it’s version from 1.5 to 1.6. In the search text box on the top left, type “facet” and click Project Facets. Right click on the “hello-world-tomcat-webapp” and select Properties in the popup. 1.2 Setting Project Facet JRE VersionĪccording to the Eclipse documentation, “Facets define characteristics and requirements for Java EE projects and are used as part of the runtime configuration.” By adding a facet, we are editing the configuration of the project so it can do certain things. When we get to the second step of automatically setting the JRE version with Maven, then we’ll fix those errors we created. That’s okay, because if you were actually switching JRE versions manually, you’d have the awareness to set the versions to the same value. In this first step of manually setting the JRE version, we will actually set a different JRE version in 3 areas of the Project Properties on purpose, just for demonstration purposes to see what the error messages look like when the JRE versions don’t match. Since I only have JRE 1.8 set up in Eclipse right now, it actually gives me warnings about the version disparity: For me, Eclipse defaulted the JRE version to 1.5. We will start with the state of the project where we left off in the last article. We will add a new Java distribution (Amazon Corretto 8) to the Eclipse workspace.We will automatically set the JRE version by editing the pom.xml, and see that Maven sets all of the items, which we just set manually in step 1.We will manually set the JRE version by editing various spots in the Project Properties.
#How to install jre 8 how to#
This article will build upon that, using it in demonstrating how to switch the JRE version for the project. In the last article, we stood up a Tomcat server, and deployed a hello world web application.