• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Annoying error while using eclipse

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use eclipse for a java project, integrated with junit and ant. I use the IDE for all editing, later run the ant build script from a command line in a dos window. I do this just for the reason that its faster than eclipse's compilation. But i find that, after i do this, eclipse behaves strangely sometimes, saying that some classes have become inconsistent. I tried refreshing many times, but that persists forever. That doesnt harm my compilation in the command line, everything runs fine. However that annoying errors still persist whenever i open the project in eclipse.
Any bright idea to get rid of the errors?
 
Author
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse might be happier if you ran ant from within the Eclipse environment itself, optionally having the build do a refresh.
This is not the best way to use the tool though. The built-in incremental compiler should be faster than using Ant and you'd get the benefits such as hotswap during debugging (Visual Studio calls it Compile and Go I believe). Very handy.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had the same problem. One of the jars in my classpath strangely was causing Eclipse to crash when I would run ANT. I needed the jar, I needed ANT, so what I did was in ANT I changed my class output path. Where Eclipse outputs classes to /classes, ANT outputs to /xclasses. Now the 2 don't know about each other and life is so much more happier.
 
tumbleweed and gunslinger
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try running ant in it's own JVM instance. My guess is Ant in DOS and Eclipse are running in the same JVM and there appears to be some issue there...
I believe there is a setting within Eclispe to allow for this, but I may be wrong.
 
reply
    Bookmark Topic Watch Topic
  • New Topic