Categories

 

April 2008
M T W T F S S
« Oct   Jun »
123456
78910111213
14151617181920
21222324252627
28293031  

What I'm Doing...

IMG00015.jpgIMG00017.jpgFallColors.jpgSpringFirst snow of the seasonTail Wind

Eclipse and ANT build problem with jdk1.3

You can’t do an ANT build inside eclipse if your chosen jdk is 1.3. Here is a the error message you get…

BUILD FAILEDjava.lang.NoClassDefFoundError: org/xml/sax/SAXExceptionat org.apache.tools.ant.ProjectHelper.getProjectHelper(ProjectHelper.java:228)at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.parseBuildFile(InternalAntRunner.java:189)at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:400)at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

nice little trick to fix that…

Inside Eclipse Go to Window->Preferences…->Ant->Runtime

In the classpath tab, add a new entry to the Ant Home Entries to the xerces jar file inside your eclipse/pluggins folder. In my case the file was org.apache.xerces_2.8.0.v200705301630.jar.

Now go ahead an run your build again successfully :)

update: When I updated my eclipse to 3.4, this again stopped working for me. The above fix did not work.I then saw a mailing list where the user executed the ant script by right clicking the ant script and choosing Run->Ant build..

Now change the JRE it runs in. It should be set to the option which says “Run in the same JRE as the workspace”

The mailing list thread is here

  • Share/Bookmark

Related posts:

  1. Problems with StrutsLoginDemo in myeclipse Its been a while since I had done a struts...

Related posts brought to you by Yet Another Related Posts Plugin.

1 comment to Eclipse and ANT build problem with jdk1.3

  • RobertMarkBram

    Thanks Shireen – this helped me. I am using Ganymede and followed your first set of instructions without reading ahead, so it didn’t work at first. Then I went back and read the rest of your post to get it working. :)

    This is an important point for those (like me) working for clients still using “old-school” JDKs. In our case, we have a project for the main code (using JDK 1.3) and another project for unit tests (using JDK 1.6).

    Rob
    :)

    ReplyReply

    [Reply]

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WP Hashcash