Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Add source code to project
Add source code to project [message #1238272] Fri, 31 January 2014 21:42 Go to next message
Patrick Tchakounte is currently offline Patrick TchakounteFriend
Messages: 1
Registered: January 2014
Junior Member
I want to add my .java source file to my project, but everytime I get a red circle with a cross inside, right next to my project name and my src folder.

I opened my Eclipse then did the following.

Creating new Project: File > New > Java Project
In "Create a Java Project" window I typed the Project name then clicked Next then clicked Finish.

Adding source file:
I expanded the Java project, opened the folder where the source code is located, then dragged and dropped it into the src folder.

Then I get the red circle with a cross inside, right next to my project name and my src folder.

Am I doing something wrong?
Re: Add source code to project [message #1239283 is a reply to message #1238272] Mon, 03 February 2014 21:13 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Open the file (double-click on it in the Eclipse explorer view) and see what error(s) is/are reported. Alternatively, open the Markers view and see what the error(s) says.
Alternatively, open Help > Help Contents and then look for the Getting Started guides under "Java development user guide."
Re: Add source code to project [message #1239649 is a reply to message #1238272] Tue, 04 February 2014 17:42 Go to previous messageGo to next message
e l is currently offline e lFriend
Messages: 3
Registered: February 2014
Junior Member
A similar experience observed after import of the source code for 'openlca'. After import into a new project, 34826 errors were reported!

Any advice where to start when so many errors are found after an import?
Re: Add source code to project [message #1239653 is a reply to message #1239649] Tue, 04 February 2014 17:57 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Right-click on the Project, select Properties, then go to the Java Build Path section and see if any problems are indicated there. Or sort the Markers view so that Build Path problems are at the top.
When a project has huge numbers of errors it usually means the build path is not correct. As I said, see the Getting Started guides for examples of setting up Java projects using existing source; most problems like this are due to not understanding how to configure Java projects properly.
Previous Topic:No way to install JSDT
Next Topic:Eclipse Crashing on Startup/Loading/Splash Screen
Goto Forum:
  


Current Time: Wed Apr 24 18:58:21 GMT 2024

Powered by FUDForum. Page generated in 0.08388 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top