Skip to main content



      Home
Home » Newcomers » Newcomers » JAR/Source out of date w/Ant build
JAR/Source out of date w/Ant build [message #79161] Mon, 20 June 2005 17:19 Go to next message
Eclipse UserFriend
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 #79509 is a reply to message #79161] Wed, 22 June 2005 01:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

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.

HTH,
Eric
Re: JAR/Source out of date w/Ant build [message #79703 is a reply to message #79509] Wed, 22 June 2005 10:17 Go to previous message
Eclipse UserFriend
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
Previous Topic:CVS patches
Next Topic:Eclipse hang w/Mac, when clicking off correction proposal dialog window
Goto Forum:
  


Current Time: Thu Jul 17 22:41:34 EDT 2025

Powered by FUDForum. Page generated in 0.50636 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top