Bug 20700 - Ant does not work with Java 1.4.2 and breaks in the javah task
Summary: Ant does not work with Java 1.4.2 and breaks in the javah task
Status: RESOLVED DUPLICATE of bug 18667
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.5.3
Hardware: PC other
: P3 blocker (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-12 07:30 UTC by Pierre Nugues
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Nugues 2003-06-12 07:30:09 UTC
I use an ant makefile to compile a set of classes. Everything compiles but the
javah line breaks the code with Java 1.4.2 beta. The Java 1.4.1 works fine.

I have not isolated the bug. Here is the excerpt that breaks the ant compile:
<target name="header" depends="compile">
<javah classpath="${outputDir}" destdir="${cSrcDir}"
    force="yes">
<class name="se.lth.cs.carsim.LinkGrammarAPI" />
</javah>
</target>


Here is the output:
    [javah] ClassArgument.name=se.lth.cs.carsim.LinkGrammarAPI

BUILD FAILED
java.lang.NoSuchMethodError: com.sun.tools.javah.Main.<init>([Ljava/lang/String;
)V
        at org.apache.tools.ant.taskdefs.optional.Javah.doClassicCompile(Javah.j
ava:350)
        at org.apache.tools.ant.taskdefs.optional.Javah.execute(Javah.java:320)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

  Total time: 10 seconds
java.lang.NoSuchMethodError: com.sun.tools.javah.Main.<init>([Ljava/lang/String;
)V
        at org.apache.tools.ant.taskdefs.optional.Javah.doClassicCompile(Javah.j
ava:350)
        at org.apache.tools.ant.taskdefs.optional.Javah.execute(Javah.java:320)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
com.sun.tools.javah.Main.<init>([Ljava/lang/String;)V
Comment 1 peter reilly 2003-06-12 07:41:17 UTC
Duplicate of 18667
and fixed in current CVS

*** This bug has been marked as a duplicate of 18667 ***