Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: 'System' cannot be resolved

Tags:

java

eclipse

First i installed java 7.0 update 25 and then installed eclipse. Later as per requirement, I uninstalled this java version and installed earlier version 5.0

Now in every eclipse program, it is showing error with word 'System'. Solution is to add path of java.exe to eclipse. Can anyone guide me to do it?

like image 641
user2898038 Avatar asked Nov 30 '22 12:11

user2898038


2 Answers

To resolve this problem perform below steps: Go to Package Explorer -> Select your Project -> Right click on your project -> go to Properties-> Click on Java build path -> select your JRE file (mostly it will display error) and click on edit button which is on right side -> new dialog box will get displayed as “JRE System Library” in this window select radio button i.e"Workspace default JRE(jre6)" or whichever you have installed. Then click on finish. Errors will not come.

like image 192
user4229947 Avatar answered Dec 05 '22 17:12

user4229947


The solution to the above problem is, change the JRE system library by doing the following:

  1. Right click on your project and select properties.
  2. Select Libraries from the tab.
  3. Select the current JRE system library and click on edit.
  4. Select either Alternate JRE or Workspace default JRE (Latest version of JRE).
  5. Click Finish and then OK.
like image 29
Paul Avatar answered Dec 05 '22 19:12

Paul