How can the JRE be configured in Eclipse?

The method to configure Eclipse JRE is as follows:

  1. Open the Eclipse IDE.
  2. Click on the “Window” option in the menu bar, and then select “Preferences”.
  3. In the pop-up dialog box, expand the “Java” folder and select the “Installed JREs” option.
  4. Click on the “Add” button on the right side.
  5. In the pop-up dialog box, select “Standard VM” and click the “Next” button.
  6. In the “JRE home” field, click on the “Directory” button and select the folder where the JRE is located. For example, if the JRE is in the folder C:\Program Files\Java\jre1.8.0_201, then choose that folder and click on the “OK” button.
  7. Make sure the “JRE name” field displays the correct JRE version number, and then click the “Finish” button.
  8. In the “Installed JREs” dialog box, make sure the newly added JRE is selected and click the “OK” button.
  9. In Eclipse, right-click on the project name in the project, and select “Properties”.
  10. Choose the option “Java Build Path” in the popup dialog box.
  11. Click the “Add Library” button in the “Libraries” tab on the right side.
  12. In the pop-up dialog box, select “JRE System Library” and click the “Next” button.
  13. Select the added JRE version from the drop-down menu and then click on the “Finish” button.
  14. Make sure the newly added JRE is selected, and click on the “Apply” and “OK” buttons to save the changes.

In this way, you have successfully set up Eclipse’s JRE.

广告
Closing in 10 seconds
bannerAds