• 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

how to set Eclipse don't build *.class file when errors exist?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My Eclipse version is 3.5(jee-galileo).
if it's possible to set someting.
then the .class file will not build when there are some error or Exceptions.?
Because sometimes i will confuse if the class is fine or not.
very thanks.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Class files are not generated for classes having compiling errors. If you have an old class file, it won't be deleted though. But I don't see where the problem is. If you can't compile, it's not even worth looking at the class file. Do you have a more specific problem ?
 
lin playaoc
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the problem maybe due to Eclipse....
such as my code: it has an exception, test is not reasonable.
when I save the file,(My project set Build Automatically).and the *.class file will be builded.
I hope not to build this class,it will confuse me.and the class should be empty.


the decompiled builded *.classes
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I hope not to build this class,it will confuse me.


Why does it confuse you ? Why are you looking at the class file ? I'm not sure that you can configure this behaviour in Eclipse.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interesting; I didn't know it did that, although I guess when I think about it I *have* seen it, and it makes sense.

I also can't think of a reason why it *shouldn't* do that, or why you're looking for the presence of a particular class file a evidence of project compilation success--wouldn't it make more sense to look in the IDE, the mechanism by which you're building it?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David wrote:Interesting; I didn't know it did that


I didn't either. I never look at the classes directory. If there are compilation errors, I see them in the Problems view, I see them in the Package Explorer.

After googling, I found some information here. It looks like it's the default behaviour since Eclipse 3.4.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also interesting--thanks for the link.
 
reply
    Bookmark Topic Watch Topic
  • New Topic