f



Falling back to an earlier version if ant

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
0
aaronfude (214)
3/16/2009 7:16:31 PM
comp.lang.java.programmer 52707 articles. 0 followers. Post Follow

3 Replies
306 Views

Similar Articles

[PageSpeed] 35

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
0
arne6 (9808)
3/17/2009 1:25:33 AM
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
0
noone7 (4050)
3/17/2009 1:44:16 AM
On Mon, 16 Mar 2009 12:16:31 -0700 (PDT), Aaron Fude
<aaronfude@gmail.com> 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
0
see_website (5876)
3/17/2009 3:14:37 AM
Reply: