JAR/Source out of date w/Ant build [message #79161] |
Mon, 20 June 2005 17:19  |
Eclipse User |
|
|
|
I'm running 3.0.2 on Mac OS 10.3.9. My problem is that Eclipse doesn't
seem to "know" when a .jar file has been updated, and the source I've
attached to it.
Typically this happens because I've got a JAR file built from source that
I'm editing. I've previously added the JAR file, and edited the Java
Source Attachment property to tell Eclipse where the source lives.
When I go to debug my project, and step into code from the JAR, I see the
old source (and I'm apparently using the old JAR). If I repeat the step
above (attaching the Java source) or quit/relaunch Eclipse then everything
seems to be in sync again.
I'm assuming this should work, so what am I doing wrong?
Thanks,
-- Ken
|
|
|
|
Re: JAR/Source out of date w/Ant build [message #79703 is a reply to message #79509] |
Wed, 22 June 2005 10:17  |
Eclipse User |
|
|
|
Originally posted by: ken.transpac.com
Eric Rizzo wrote:
> Ken Krugler wrote:
>
>> I'm running 3.0.2 on Mac OS 10.3.9. My problem is that Eclipse doesn't
>> seem to "know" when a .jar file has been updated, and the source I've
>> attached to it.
>>
>> Typically this happens because I've got a JAR file built from source
>> that I'm editing. I've previously added the JAR file, and edited the
>> Java Source Attachment property to tell Eclipse where the source lives.
>>
>> When I go to debug my project, and step into code from the JAR, I see
>> the old source (and I'm apparently using the old JAR). If I repeat the
>> step above (attaching the Java source) or quit/relaunch Eclipse then
>> everything seems to be in sync again.
>>
>> I'm assuming this should work, so what am I doing wrong?
>
>
> If you are working on the Java source, you do not need to be using the
> JAR file to debug. The Project will automatically include the built
> classes on the classpath when you launch the program to debug. By
> including the generated JAR file along with the source, you are
> essentially telling Eclipse about your classes twice.
> Drop the JAR from your Eclipse classpath and you should be good to go.
This JAR is built from separate sources that are not part of my project,
so I don't actually have both. But I haven't tried to use the class
files (vs. the JAR) that are built by Ant; maybe then the problem would
go away. I'll give that a try.
I'm trying to avoid creating a sub-project with all of the sources (in
place of the Ant build), since these come from a separate open-source
project, and the build.xml for this project changes relatively often.
Thanks!
-- Ken
|
|
|
Powered by
FUDForum. Page generated in 0.50636 seconds