File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes little red x's in Eclipse everytime i start the program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "little red x Watch "little red x New topic
Author

little red x's in Eclipse everytime i start the program

Kiley smith
Greenhorn

Joined: Jun 17, 2011
Posts: 27
Hi everyone,

I'm having a problem with Eclipse. I know this isn't an Eclipse forum but it's very java related so please forgive.

Each time I load Eclipse, all my projects have little red x's and they all give me compiling grief. I have to go to each class, exclude the build path and then include it again.

There has to be a better way.

Many thanks,
Kiley
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

What exactly do you mean by " go to each class, exclude the build path and then include it again. "? I ask because the build path is associated with the project, not with the class files. Also, once you set up the build path to reference the JARs your project requires, those JARs should always be in the path. Double-check the .classpath file in the base directory of your project to ensure that it is maintaining your classpath.

And by the way, this forum is for Eclipse and other IDEs, so you asked in the right location.


JBoss In Action
Kiley smith
Greenhorn

Joined: Jun 17, 2011
Posts: 27
Hi there and thank you for reading my question.

If you go to this url you can see the little red x, well red box with white x.

http://www.netmatrix.com/java1.jpg

When I compile this program from the dos prompt it compiles and runs just fine.

If I create the program by, "new java project" and create the simple Circle class with a main method, it works. But when I close Eclipse down and re-open it I get the above url. (http://www.netmatrix.com/java1.jpg)

Also, every time I close Eclipse I get this:

http://www.netmatrix.com/java1.jpg

I'm running Vista Home Premium.

This is getting really frustrating. I don't know how to prevent those x's from showing up and they ultimately tell me something is wrong with my Eclipse set-up or project set-up... not sure. I am all of 1 month into Java (done C, C++, vb).

Thank you for your help,
Kiley
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

Unfortunately. java1.jpg doesn't tell me anything. Yes, I see the red X, but the project was not expanded so I cannot tell what Eclipse thinks is wrong. If you expand it all the way I could tell better.

Also on java1.jpg, Eclipse is complaining that it cannot find class Circle. Unfortunately the part of the source shown omits the package declaration thus I cannot tell which package Circle is in. And that makes a huge difference.

With java1.jpg, you blanked out the most important part of the path. Vista is a little picky about where you place things, so without knowing he directory whose name you hid I can only make guesses. The blanked-out portion is too long to be Users. I hope it is not Program Files (that is the worst place to put anything in Vista). I also hope it is not ProgramData, that is another sure way to cause yourself grief.

On my PCs I place eclipse at c:\apps\eclipse, and my workspace is at c:\opt\workspace. Neither of these directories is special to Vista (or Windows 7, which I am using) which means that the OS will not get in my way by doing "helpful" things for me security-wise. In addition, I own c:\apps and c:\opt, and I have full access rights, so there is no questions of my rights to access anything in those directories.

But essentially that dialog box is telling you that you don't have write access to the directory. Is your account and admin account? What is your UAC setting? Have you tried running Eclipse as an administrator? I suspect that until you get around the Vista security issues you will continue to see red Xes.
Kiley smith
Greenhorn

Joined: Jun 17, 2011
Posts: 27
Hi Peter,

I have un-blacked the path, it was just a habit.

Is there enough detail in the images now? I'm really motivated to get these little bothersome issues solved so if there is any other info I can provide please let me know

Thank you very much,
Kiley
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Look in the "Problems" view. There will be one or more lines with the same little red "X". We need to see the text from those lines. Double click each one to open it up; if there's more possibly useful text, we need to see that, too.


[Jess in Action][AskingGoodQuestions]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

The Athabasca directory doesn't ring a bell with me - did you create that directory? Or did Windows?

You still need to check the security settings for both files, and all of the directories, mentioned in java2.jpg.
Kiley smith
Greenhorn

Joined: Jun 17, 2011
Posts: 27
Hi there,

Thank you for helping me with this. The Athabasca directory is one I made.

I have re-created java1.jpg and the problems view is now open. I opened the Circle, too. (you'll see what I mean, not sure how to say it).


http://www.netmatrix.com/java1.jpg

Please let me know what else I can provide.

Thank you very much,
Kiley
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Well, that error message is pointing you to the problem. Eclipse wants to store information in a particular location inside the ".metadata" directory it wants to keep inside your workspace (C:\Athabasca\java\Kiley\.metadata), but for some reason, it's failing to do so. Figure out why, and your problem will be solved.

- Is your disk full?
- Do you for some reason not have permission to write there (for example, perhaps some other user owns it?)
- Are you experiencing hard disk failures?
- Is a misguided anti-virus program blocking the writes?

Or maybe your workspace is just corrupted. If you don't have too much invested in the workspace itself, you might simply create a new one, and copy your Java source code into it; chances are the new one will be just fine.
Kiley smith
Greenhorn

Joined: Jun 17, 2011
Posts: 27
Done! I just created a new workspace and, from what I've seen, the issue is gone. Thank you very much. I need to google how to get Eclipse to open the second workspace instead of the one giving me grief.

Thank you,
Kiley
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Great, glad to hear it!
 
 
subject: little red x's in Eclipse everytime i start the program
 
Similar Threads
Calendar in Android
eclipse javadoc?
Error highlighting in Eclipse 3
AdviceApp from HeadFirstEJB
WebLogic 9.2 and Eclipse