rebecca richa
rebecca richa

Reputation: 11

java - Eclipse gives me an error when i create a new project

I am using Eclipse IDE Galileo, on windows 8.1

When I want to create a new project, I go to file> new> java project.

I name my project then click on finish.

I then open the src file under my project and right click it. new> class. And I name my class But before i even write any program, I have these errors. So can anybody please help me? Thanks in advance.

Here's the errors: http://tinypic.com?ref=b65yk7img/

NOTE: My friend have the same problem, but she is using windows xp.

Upvotes: 1

Views: 3640

Answers (2)

Irfan Nasim
Irfan Nasim

Reputation: 2222

Dear @rebecca richa This problem will occur if your project have not JDK libraries. To add JDK libraries follow the following steps

right click on project --> Properties --> java build path --> select Libraries tab --> now click on Add Library --> select JRE System Library --> select Workspace Default JRE

your problem will be solved. other wise click on alternate JRE and select the path of jdk in your system where youenter image description here have installed. now your problem will definitely solved.

for further help follow the image below

Upvotes: 2

Lalit Mehra
Lalit Mehra

Reputation: 1273

Seems like eclipse couldn't find Java Classes for your project.

Do This...

  1. Right Click your project

  2. Hover on Build Path

  3. Select Configure Build Path...

  4. Select Libraries Tab in the newly opened window

  5. Click Add Library

  6. Select JRE System Library from the newly opened popup

  7. Close the Window using OK

This should remove the errors

Upvotes: 1

Related Questions