Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

the Eclipse compiler is playing a nasty trick on me

 
John A Taylor
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never seen this before! Eclipse is supposed to compile each time you save: it stopped doing that for me at some point today. Now, I can type any junk at all into a source file and save, and the compiler completely ignores it. As an additional consequence, its quick-complete facility has gone out of synch: it no longer offers to autocomplete identifiers that were added since this problem started.
Compile errors are only reported when I run an Ant build (which I also do through Eclipse).
I've tried restarting Eclipse and even rebooting my machine. No dice. There does not seem to be any preferences setting for this behavior, and I can't find any discussion of if on the Web ... can anybody please tell me what's going on?!

Many thanks!
jat
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

Welcome to JavaRanch!

Sounds like Eclipse has decided your project is not a Java project. I've never seen this happen, but maybe you're just talking about a new project you started? Make sure you create Java projects as Java projects.

I'm going to move this to our "IDEs and Other Tools" forum for any followup.
 
James Swan
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have had similar behaviour when using Eclipse and Ant.
The approach I took to get Eclipse back in sync was:

Project --> Clean --> (check start a build immediately)
(Try doing a refresh of your project as well).
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the Eclipse compiler is playing a nasty trick on me

Eclipse is not a compiler

There does not seem to be any preferences setting for this behavior


There is actually an option:
Window->Preferences->Workbench->Build Automatically

Make sure that it is on.
 
John A Taylor
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed it!

The cause, FYI:
Eclipse was complaining about three missing JAR files at the project level and saying it was unable to build the project. I had noticed these errors earlier but ignored them since (a) I was rather busy, (b) the JARs were already on the build path and I didn't understand what Eclipse was talking about, and (c) the Ant build was not affected so I was able to continue with my development / testing cycles.

It seems that Eclipse basically quit compiling at some point because of these outstanding problems. Once the build path errors were resolved (by removing the JARs and re-adding from other locations), the compiler and the quick-complete came back to life.

Thanks for all your suggestions, they all made good sense (and I had actually tried them yesterday). James, thanks for moving the subject to the right category. I should have seen that one before posting in the first place. "Java beginner" was kind of a shot in the dark.

regards,
jat

P.S. I do know that Eclipse is an IDE, not a compiler. A little imprecision by me in the wording.
 
John A Taylor
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

actually that's Ernest, thanks for moving the subject to the right category.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic