Falling back to an earlier version if ant

Discussion in 'Java' started by Aaron Fude, Mar 16, 2009.

  1. Aaron Fude

    Aaron Fude Guest

    Hi,

    I have 1.6.0_12 and I need to compile my code to run with 1.5.0.17.

    I use ant.

    Is there a way to tell javac to fall back to an earlier version?
    Alternatively, can I just tell ant with javac to use (if I have both
    on my machine)?

    An explicit example of either would be just great!

    Many thanks in advance,

    Aaron
     
    Aaron Fude, Mar 16, 2009
    #1
    1. Advertising

  2. Aaron Fude

    Arne Vajhøj Guest

    Aaron Fude wrote:
    > I have 1.6.0_12 and I need to compile my code to run with 1.5.0.17.
    >
    > I use ant.
    >
    > Is there a way to tell javac to fall back to an earlier version?
    > Alternatively, can I just tell ant with javac to use (if I have both
    > on my machine)?
    >
    > An explicit example of either would be just great!


    Usually the source and target attributes are sufficient.

    But if not then you can use the executable attribute (together
    with fork="yes" !).

    http://ant.apache.org/manual/CoreTasks/javac.html

    has it all.

    Arne
     
    Arne Vajhøj, Mar 17, 2009
    #2
    1. Advertising

  3. Aaron Fude

    Lew Guest

    Aaron Fude wrote:
    > Hi,
    >
    > I have 1.6.0_12 and I need to compile my code to run with 1.5.0.17.
    >
    > I use ant.
    >
    > Is there a way to tell javac to fall back to an earlier version?
    > Alternatively, can I just tell ant with javac to use (if I have both
    > on my machine)?


    -source, -target and -bootclasspath

    <http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html>

    --
    Lew
     
    Lew, Mar 17, 2009
    #3
  4. Aaron Fude

    Roedy Green Guest

    On Mon, 16 Mar 2009 12:16:31 -0700 (PDT), Aaron Fude
    <> wrote, quoted or indirectly quoted someone who
    said :

    >Is there a way to tell javac to fall back to an earlier version?
    >Alternatively, can I just tell ant with javac to use (if I have both
    >on my machine)?


    see http://mindprod.com/jgloss/jdk.html#MULTIPLE

    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    "America ships tons of sugar cookies to Denmark, and Denmark ships tons of sugar cookies to America. Wouldn’t it be more efficient just to swap recipes?"
    ~ Michael Pollan
     
    Roedy Green, Mar 17, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ALuPin

    Rising, falling edge

    ALuPin, Apr 21, 2005, in forum: VHDL
    Replies:
    0
    Views:
    7,061
    ALuPin
    Apr 21, 2005
  2. Sky
    Replies:
    0
    Views:
    370
  3. Anon Anon
    Replies:
    2
    Views:
    1,383
  4. V Green
    Replies:
    0
    Views:
    927
    V Green
    Feb 5, 2008
  5. PA Bear [MS MVP]
    Replies:
    0
    Views:
    1,038
    PA Bear [MS MVP]
    Feb 5, 2008
Loading...

Share This Page