if you are facing this below image error in TESTNG.
error image
To correct the error use Window -> preferences -> java -> installed JREs -> Execution environments and select the JRE version option in compatible JREs.click apply and close button.Now you will see all your JRE jar will be available in your project.
solved image