• 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

Eclipse3.0 removes class files automatically

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

I've noticed that Eclipse removes all class files in the following cases:

1) Whenever I save a source file (and 'Build Automatically' is on) Eclpise runs 'Building workspace...' (you can see it on the lower right corner of eclpise), and this process actually removes all the class files.
So when I choose ant target to compile my java classes it compiles ALL the files although I saved only one file.

2) If I turn 'Build Automatically' to off, then Eclipse run the 'Building Workspace' only when I select an ant target to build the project. so Again, all the class files are removed just before I choose to compile them, so again, I'm compiling all the sources!!!

Anyone knows why it removes all the class files, and how to solve thsi problem? I can't have partial compilation now.

thanks,
Nira.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, the fix is to not use Ant to compile. Why would you want to, anyway? You are loosing all the benefits of the incremental Eclipse compiler...
 
Nira Shavitt
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How exactly I should use the eclipse compiler to compile incrementaly?

Should I check the 'Build automatically' on and use my ant file only for building the jar? or I should turn off the 'build Automatically' and use 'Build Project' once in a while? When I click on Build Project, it looks like nothing happens. Also Build All didn't compile my sources...

Any idea?
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nira Shavitt:
How exactly I should use the eclipse compiler to compile incrementaly?

Should I check the 'Build automatically' on and use my ant file only for building the jar?



That's one option, especially if you are the only one working on the project.

In a team it might be a better idea to build distributions totally outside of Eclipse, on a build server or something.

When I click on Build Project, it looks like nothing happens. Also Build All didn't compile my sources...



Take a look at wether the Build Path is set correctly for your project...
 
Nira Shavitt
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well, yes, the Build path is set correct.

Any other idea?

Nira Shavitt.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the contents of the .project and .classpath files, please?
 
Nira Shavitt
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here is .classpath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry sourcepath="X:/Titan/TOOLS/junit3.8.1/src.jar" kind="lib" path="X:/Titan/TOOLS/junit3.8.1/junit.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/BusinessLogic/Lib/Ext/xml-apis.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/BusinessLogic/Lib/Ext/concurrent.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/BusinessLogic/Lib/Ext/jce.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/BusinessLogic/Lib/Ext/jmxri.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/BusinessLogic/Lib/Ext/log4j.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/BusinessLogic/Lib/Ext/websphere/wsexception.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/BusinessLogic/Lib/Ext/xalan.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/BusinessLogic/Lib/Ext/websphere/admin.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/BusinessLogic/Lib/corba.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/Tomcat/common/lib/servlet.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/BusinessLogic/Lib/Endorsed/crimson.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/JBoss/client/jboss-j2ee.jar"/>
<classpathentry kind="lib" path="X:/Titan/directory_root/System/Tomcat/common/lib/ant.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>


Here is .project:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Framework</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>


thnaks for trying...
Nira Shavitt.

[edited to show full XML]
[ August 29, 2004: Message edited by: Jeanne Boyarsky ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic