• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Kiley smith
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 27
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great, glad to hear it!
reply
    Bookmark Topic Watch Topic
  • New Topic