The only option you have is to use a forked compiler and have it use
the 1.4 javac.
- Brett
On 10/18/05, Arik Kfir <[EMAIL PROTECTED]> wrote:
> The java compiler does not warn you if you use API that's new since
> 1.5 - it only makes sure you use language constructs that are
> available in 1.4 as well. This means, for instance, that you won't be
> able to use enums or generics. But it will not prevent you from using
> any API (1.5 or not).
>
> This is a known limitation of Java - and has nothing to do with maven....
>
> On 10/18/05, Charles-Alexandre Sabourdin <[EMAIL PROTECTED]> wrote:
> > The problem is that when I use jdk 1.5 with 1.4 source code, I does not warn
> > me for using methode that are only since 1.5.
> > I set the following simple exemple :
> > maven use jdk 1.5
> >
> > my project.properties have the following parameter :
> > maven.compile.source=1.4
> > maven.compile.target=1.4
> > and my exemple class is :
> >
> > public class App
> > {
> > public static void main( String[] args )
> > {
> > String str1 = "Test 001";
> > System.out.println( "str1 : "+str1 );
> > System.out.println( "str1.replace(\"001\", \"002\") :
> > "+str1.replace("001", "002"));
> > }
> > }
> >
> > Normally does not works in 1.4, but I cant compile it.
> > with maven jar:jar, but I can not run this jar with 1.4 JRE.
> >
> > Is it normal ?
> >
> > I suppose that those parameter should have block compilation.
> >
> > --
> > Charles-Alexandre
> > SABOURDIN
> > -----------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]