wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Build Failed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Build Failed" Watch "Build Failed" New topic
Author

Build Failed

Mohd Rosman
Greenhorn

Joined: Oct 22, 2012
Posts: 6
Hi eveyone!

I'm new here, i have the problem with this error:

java.lang.NoSuchMethodError
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.setBuiltInProperties(InternalAntRunner.java:1015)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.setProperties(InternalAntRunner.java:1004)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:362)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

I have to complete my task using J2SE 1.3.1_04, n i already installed it to my computer.
i set JAVA_HOME and PATH = C:\jdk1.3.1_04\bin

I use Eclipse Galileo. Can anybody tell me how i can solve my problem.

Thanks
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Mohd, welcome to Java Ranch!


1) What version of Ant are you using?

2) You mentioned Eclipse. Are you running the build from within Eclipse or from the command line?

3) If you ran the build in Eclipse, try again from the command line; do you get the same error?

4) Please post the build.xml file and the full Ant output (get the output by running Ant from the command line). (There is probably more info in the error message than what you posted.)


JBoss In Action
Mohd Rosman
Greenhorn

Joined: Oct 22, 2012
Posts: 6
Hi Peter,

1. I use Ant version 1.7.1
2. I running the build from within Eclipse
3. When i run using ant -buildfile build_all.xml its work
4. Here i attach my dir structure and build_all.xml

directory structure:

project
|-- ar
|-- source
|-- main
|-- build_all.xml

build_all.xml

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="compile" name="ar">

<target name="init">
<property name="hello" value="world"/>
<property name="arclass" value="../../../../build/classes"/>
<property name="arsource" value="../main"/>
</target>

<target depends="init" name="compile">
<javac debug="true" deprecation="false" srcdir=".;${arsource}" destdir=".;${arclass}" >
<classpath>
<fileset dir="../../../library">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${arclass}"/>
</classpath>

</javac>
</target>

</project>


Thanks!!


Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

I suspect that Ant 1.7.1 is not compatible with JDK 1.3.1. I suggest you download an older version of Ant. Check the dates on the files in JDK 1.3.1 and select an Ant version that has a date close to that.
Mohd Rosman
Greenhorn

Joined: Oct 22, 2012
Posts: 6
Hi Peter!

Frankly say i'm new to java, and i don't have any big project development experience using java.
I learn java using jdk1.6, and i have to solve the problem using jdk1.3 (Existing project use jdk1.3.1_04).

How should i do?

I try to solve my problem using eclipse and compile using jdk 1.6, but its not solve the problem.
I also try use the older version of eclipse to solve it but the result still disappointing.

I dont what ide or tools the developer use to develop the project. The project use webwork as a framework

Thanks


Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

I already indicated what you need to do about the Ant version. You could try the same thing with Eclipse - find and older version released about the time JDK 1.3.1 came out. Other than that, my suggestion would be to use a plain text editor. (You could even use Eclipse as a text editor)

The problem is, of course, that you are trying to work with an ancient version of Java and none of the newer tools are going to work very well with it.
Mohd Rosman
Greenhorn

Joined: Oct 22, 2012
Posts: 6
Hi Peter.

Thanks for your helpful info.
Mohd Rosman
Greenhorn

Joined: Oct 22, 2012
Posts: 6
Hi Peter!

Thanks for your advice , finally i can build my application without problem.

Here the solution i get:

1. I use the apache ant 1.5.4
2. i use Eclipse galileo sr2
3. Add external jar: org.eclipse.ant.ui_3.4.2.v20091204_r352

At eclipse Edit Configuration - Classpath - User Entries i set:

1. Ant Home: C:\apache-ant-1.5.4
2. add external jar file

Thank You!!!


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Build Failed