ank5
asked on
Code not compiling in eclipse
I am trying to set up an existing project in eclipse. After creating the project, when I open any of the source files, it gives me errors like
the type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
Can someone please let me know what settngs do I need to make to have it compiled with Java. Java is already set is the Path environment variable of the system. I am able to execute Java commands from command prompt. Do I need to do something in eclispe as well?
Thank you
the type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
Can someone please let me know what settngs do I need to make to have it compiled with Java. Java is already set is the Path environment variable of the system. I am able to execute Java commands from command prompt. Do I need to do something in eclispe as well?
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hit "Add Library ...", Select "JRE System Library" and add the appropriate JRE for the project (eg. 'Workspace default JRE')
Hit "Finish" in the library selection and "OK" in the project properties and then wait for the re-build of the project
see link above
Hit "Finish" in the library selection and "OK" in the project properties and then wait for the re-build of the project
see link above
Go to properties of project with the build error (right click > Properties)
View the "Libraries" tab in the "Build Path" section
Find the "JRE System Library" in the list (if this is missing then this error message is not an eclipse bug but a mis-configured project)
Remove the "JRE System Library"
Hit "Add Library ...", Select "JRE System Library" and add the appropriate JRE for the project (eg. 'Workspace default JRE')
Hit "Finish" in the library selection and "OK" in the project properties and then wait for the re-build of the project
Hopefully the error will be resolved ...
View the "Libraries" tab in the "Build Path" section
Find the "JRE System Library" in the list (if this is missing then this error message is not an eclipse bug but a mis-configured project)
Remove the "JRE System Library"
Hit "Add Library ...", Select "JRE System Library" and add the appropriate JRE for the project (eg. 'Workspace default JRE')
Hit "Finish" in the library selection and "OK" in the project properties and then wait for the re-build of the project
Hopefully the error will be resolved ...
ASKER
No it is not there. How do I add it?