You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jeff Larsen <la...@qec.com> on 2002/06/20 18:42:23 UTC

Compiling for JDK 1.1.8

I'm running Ant 1.4.1 under JDK 1.3.1. I need to
compile some projects to be run under JDK 1.1.8.

See the buld.xml below...

Ant is *NOT* properly compiling with JDK 1.1. I can
tell this two ways. During the compile, I get deprecation
warnings for things that were not deprecated until 1.2.
And also, some of my custom swing stuff just doesn't work
when I run it under 1.1.8.

If I execute ant using JDK1.1.8 my build is just fine.

What's up?

Jeff



<project name="Package qec.util" default="build" basedir=".">

  <property name="build.compiler"       value="javac1.1" />
  <property name="java.target"          value="1.1" />
  <property name="java.lib"
value="E:/jdk/jdk1.1.8/lib/classes.zip" />
  <property name="javax.swing"
value="E:/lib/swing-1.1.1/swing.jar" />

  <target name="init">
    <mkdir dir="${basedir}/classes" />
  </target>

  <target name="build" depends="init">
    <javac srcdir="${basedir}/src"
           destdir="${basedir}/classes"
           classpathref="class.path"
           deprecation="yes"
           includejavaruntime="no"
           includeantruntime="no"
           target="${java.target}"
    />
  </target>

  <path id="class.path">
    <pathelement location="${java.lib}" />
    <pathelement location="${javax.swing}" />
  </path>

</project>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Compiling for JDK 1.1.8

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 20 Jun 2002, Jeff Larsen <la...@qec.com> wrote:

> I'm running Ant 1.4.1 under JDK 1.3.1. I need to
> compile some projects to be run under JDK 1.1.8.

Try Ant 1.5beta instead - at least the forking case should work fine.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Compiling for JDK 1.1.8

Posted by Jeff Larsen <la...@qec.com>.
If I use fork, ant says this, and continues to compile as before.

    [javac] Since fork is true, ignoring build.compiler setting.

----- Original Message -----
From: "Ultra Funkular" <fu...@nettaxi.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Thursday, June 20, 2002 11:43 AM
Subject: Re: Compiling for JDK 1.1.8


> tried forking to see if that would work?
> a suggestion offhand...
>
>
> On Thu, 20 Jun 2002 10:42:23 Jeff Larsen wrote:
> > I'm running Ant 1.4.1 under JDK 1.3.1. I need to
> > compile some projects to be run under JDK 1.1.8.
> >
> > See the buld.xml below...
> >
> > Ant is *NOT* properly compiling with JDK 1.1. I can
> > tell this two ways. During the compile, I get deprecation
> > warnings for things that were not deprecated until 1.2.
> > And also, some of my custom swing stuff just doesn't work
> > when I run it under 1.1.8.
> >
> > If I execute ant using JDK1.1.8 my build is just fine.
> >
> > What's up?
> >
> > Jeff
> >
> >
> >
> > <project name="Package qec.util" default="build" basedir=".">
> >
> >   <property name="build.compiler"       value="javac1.1" />
> >   <property name="java.target"          value="1.1" />
> >   <property name="java.lib"
> > value="E:/jdk/jdk1.1.8/lib/classes.zip" />
> >   <property name="javax.swing"
> > value="E:/lib/swing-1.1.1/swing.jar" />
> >
> >   <target name="init">
> >     <mkdir dir="${basedir}/classes" />
> >   </target>
> >
> >   <target name="build" depends="init">
> >     <javac srcdir="${basedir}/src"
> >            destdir="${basedir}/classes"
> >            classpathref="class.path"
> >            deprecation="yes"
> >            includejavaruntime="no"
> >            includeantruntime="no"
> >            target="${java.target}"
> >     />
> >   </target>
> >
> >   <path id="class.path">
> >     <pathelement location="${java.lib}" />
> >     <pathelement location="${javax.swing}" />
> >   </path>
> >
> > </project>
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Compiling for JDK 1.1.8

Posted by Ultra Funkular <fu...@nettaxi.com>.
tried forking to see if that would work?
a suggestion offhand...


On Thu, 20 Jun 2002 10:42:23 Jeff Larsen wrote:
> I'm running Ant 1.4.1 under JDK 1.3.1. I need to
> compile some projects to be run under JDK 1.1.8.
> 
> See the buld.xml below...
> 
> Ant is *NOT* properly compiling with JDK 1.1. I can
> tell this two ways. During the compile, I get deprecation
> warnings for things that were not deprecated until 1.2.
> And also, some of my custom swing stuff just doesn't work
> when I run it under 1.1.8.
> 
> If I execute ant using JDK1.1.8 my build is just fine.
> 
> What's up?
> 
> Jeff
> 
> 
> 
> <project name="Package qec.util" default="build" basedir=".">
> 
>   <property name="build.compiler"       value="javac1.1" />
>   <property name="java.target"          value="1.1" />
>   <property name="java.lib"
> value="E:/jdk/jdk1.1.8/lib/classes.zip" />
>   <property name="javax.swing"
> value="E:/lib/swing-1.1.1/swing.jar" />
> 
>   <target name="init">
>     <mkdir dir="${basedir}/classes" />
>   </target>
> 
>   <target name="build" depends="init">
>     <javac srcdir="${basedir}/src"
>            destdir="${basedir}/classes"
>            classpathref="class.path"
>            deprecation="yes"
>            includejavaruntime="no"
>            includeantruntime="no"
>            target="${java.target}"
>     />
>   </target>
> 
>   <path id="class.path">
>     <pathelement location="${java.lib}" />
>     <pathelement location="${javax.swing}" />
>   </path>
> 
> </project>
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Compiling for JDK 1.1.8

Posted by Jeff Larsen <la...@qec.com>.
Bingo!

Moving %JAVA_HOME%/lib/classes.zip from {classpath} to
{bootclasspath} did it. It sure would have been nice
if this were better documented! The purpose of
bootclasspath isn't really explained in the Ant 1.4.1 docs.

Thanks!

Jeff

----- Original Message -----
From: "Geoff Meakin" <ge...@isocra.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Thursday, June 20, 2002 12:09 PM
Subject: RE: Compiling for JDK 1.1.8


> Are you specifying the {bootclasspath} and property as well?
> You need to reference the bootclasspath and the target attribute
> of javac, not just the target attribute
> This is then so that the JDK1.3.1 compiler still compiles against
> the JDK1.1.8 API, and compiles JDK1.1.8 classes
>
> So for instance I use
>  <javac
>    target="1.1"
>    bootclasspath="~/build-libs/jdk1_1_8-classes.zip"
>
> .. which then works fine
>
> Cheers
> -Geoff
>
>
>
> -----Original Message-----
> From: Jeff Larsen [mailto:larsen@qec.com]
> Sent: 20 June 2002 05:42 PM
> To: ant-user@jakarta.apache.org
> Subject: Compiling for JDK 1.1.8
>
>
> I'm running Ant 1.4.1 under JDK 1.3.1. I need to
> compile some projects to be run under JDK 1.1.8.
>
> See the buld.xml below...
>
> Ant is *NOT* properly compiling with JDK 1.1. I can
> tell this two ways. During the compile, I get deprecation
> warnings for things that were not deprecated until 1.2.
> And also, some of my custom swing stuff just doesn't work
> when I run it under 1.1.8.
>
> If I execute ant using JDK1.1.8 my build is just fine.
>
> What's up?
>
> Jeff
>
>
>
> <project name="Package qec.util" default="build" basedir=".">
>
>   <property name="build.compiler"       value="javac1.1" />
>   <property name="java.target"          value="1.1" />
>   <property name="java.lib"
> value="E:/jdk/jdk1.1.8/lib/classes.zip" />
>   <property name="javax.swing"
> value="E:/lib/swing-1.1.1/swing.jar" />
>
>   <target name="init">
>     <mkdir dir="${basedir}/classes" />
>   </target>
>
>   <target name="build" depends="init">
>     <javac srcdir="${basedir}/src"
>            destdir="${basedir}/classes"
>            classpathref="class.path"
>            deprecation="yes"
>            includejavaruntime="no"
>            includeantruntime="no"
>            target="${java.target}"
>     />
>   </target>
>
>   <path id="class.path">
>     <pathelement location="${java.lib}" />
>     <pathelement location="${javax.swing}" />
>   </path>
>
> </project>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Compiling for JDK 1.1.8

Posted by Geoff Meakin <ge...@isocra.com>.
Sorry, its been a hard day, let me rephrase that:

"Are you specifying the {bootclasspath} and {target} attributes as well?"

-Geoff


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Compiling for JDK 1.1.8

Posted by Geoff Meakin <ge...@isocra.com>.
Are you specifying the {bootclasspath} and property as well?
You need to reference the bootclasspath and the target attribute
of javac, not just the target attribute
This is then so that the JDK1.3.1 compiler still compiles against
the JDK1.1.8 API, and compiles JDK1.1.8 classes

So for instance I use
 <javac 
   target="1.1"
   bootclasspath="~/build-libs/jdk1_1_8-classes.zip"

.. which then works fine

Cheers
-Geoff



-----Original Message-----
From: Jeff Larsen [mailto:larsen@qec.com]
Sent: 20 June 2002 05:42 PM
To: ant-user@jakarta.apache.org
Subject: Compiling for JDK 1.1.8


I'm running Ant 1.4.1 under JDK 1.3.1. I need to
compile some projects to be run under JDK 1.1.8.

See the buld.xml below...

Ant is *NOT* properly compiling with JDK 1.1. I can
tell this two ways. During the compile, I get deprecation
warnings for things that were not deprecated until 1.2.
And also, some of my custom swing stuff just doesn't work
when I run it under 1.1.8.

If I execute ant using JDK1.1.8 my build is just fine.

What's up?

Jeff



<project name="Package qec.util" default="build" basedir=".">

  <property name="build.compiler"       value="javac1.1" />
  <property name="java.target"          value="1.1" />
  <property name="java.lib"
value="E:/jdk/jdk1.1.8/lib/classes.zip" />
  <property name="javax.swing"
value="E:/lib/swing-1.1.1/swing.jar" />

  <target name="init">
    <mkdir dir="${basedir}/classes" />
  </target>

  <target name="build" depends="init">
    <javac srcdir="${basedir}/src"
           destdir="${basedir}/classes"
           classpathref="class.path"
           deprecation="yes"
           includejavaruntime="no"
           includeantruntime="no"
           target="${java.target}"
    />
  </target>

  <path id="class.path">
    <pathelement location="${java.lib}" />
    <pathelement location="${javax.swing}" />
  </path>

</project>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>