ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhendi Su <rachael...@oracle.com>
Subject Does Ant's version 1.4.1 support Java's jdk1.1.8?
Date Wed, 30 Jan 2002 03:42:02 GMT
Hi,

I am using Ant 1.4.1 on a UNIX (Solaris) platform.  I have two compilers
available: jdk1.1.8 and jdk 1.2.2.  When I ran ant using jdk 1.2.2 the
build was successful.  But when I change to jdk1.1.8, the build failed.
I basically switched the compilers by typing:

setenv JAVA_HOME  /local/java/jdk1.1.8, or
setenv JAVA_HOME  /local/java/jdk1.2.2

My build.xml file looks like:

<project name="test" default="compileSub" basedir="." >

<property name="CLASSPATH" value="/local/java/jdk1.1.8/lib/classes.zip
:/afrz/crmcon/kdv7core/comn/java/jdbc111.zip
:/afrz/crmcon/kdv7core/comn/java/xmlparserv2.zip
:/oracle/apache/ojsp/servlet.jar
:/afrz/crmcon/kdv7core/comn/java/apps.zip"/>
 <!-- the classpath afrz/crmcon/kdv7core/comn/java/apps.zip is a very
large file (~166MB) -->

<!-- initialize the timestamp -->
 <target name="init">
  <tstamp/>
  <mkdir dir="/home/rsu/test" />
 </target>

 <!-- compiling the .java files -->
 <target name="compileSub" depends="init">
  <javac srcdir="/home/rsu"  destdir="/home/rsu/test">
   <classpath path="${CLASSPATH}"/>

  </javac>
 </target>

 <!-- jar the compiled .class files -->
 <target name="archive" depends="compileSub">
  <mkdir dir="/home/rsu/jar" />
  <jar jarfile="/home/rsu/jar/okc_${TODAY}.jar" basedir="/home/rsu/test"
/>
 </target>

 <!-- delete the compiled .class files -->
 <target name="cleanup" depends="archive">
  <delete>
   <fileset dir="/home/rsu/test/" includes="**/*.class" />
  </delete>
 </target>

</project>


I noticed two things:

1) If I used jdk 1.2.2 everything worked fine.  If I used jdk 1.1.8, I
got the following error message:

[javac] Compiling 2 source files to /home/rsu/test
    [javac] Using classic compiler
    [javac] Compilation args: -d /home/rsu/test -classpath
/home/rsu/test:/local/java/jdk1.1.8/lib/classes.zip:/afrz/crmcon/kdv7core/comn/java/jdbc111.zip:/afrz/crmcon/kdv7core/comn/java/xmlparserv2.zip:/oracle/apache/ojsp/servlet.jar:/afrz/crmcon/kdv7core/comn/java/apps.zip:/home/rsu/Ant/lib/jaxp.jar:/home/rsu/Ant/lib/jakarta-ant-1.4.1-optional.jar:/home/rsu/Ant/lib/crimson.jar:/home/rsu/Ant/lib/ant.jar:/home/rsu

    [javac] Files to be compiled:
    /home/rsu/TestSubClass.java
    /home/rsu/TestBase.java


BUILD FAILED

/home/rsu/build2_test.xml:12: Error starting classic compiler:
        at
org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:104)

        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:557)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)

        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)
--- Nested Exception ---
java.lang.reflect.InvocationTargetException
        at
org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:92)

        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:557)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)

        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)

2) If I removed /afrz/crmcon/kdv7core/comn/java/apps.zip from my
classpath and used jdk1.1.8, the build succeeded.

So I wonder:
1) Does Ant 1.4.1 still support jdk 1.1?
2) If not, is any earlier version of Ant available that supports jdk
1.1?
3) I am new to Ant, so if the above error seems to you like something
other than the jdk problem, what could it be?  Any help is appreciated!

Thanks a lot!

Zhendi Su


Mime
View raw message