Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] SUN vs Eclispe compiler

This is where it gets subtle. Javac 1.4 is using 1.3 source level by
default, as you said. The source level currently only toggle assertions
on/off.
But other semantics are changed in Javac 1.4. This is why we have another
setting for toggling our compliance level (separately from the source
compatibility level).

So if you are matching the Eclipse compiler against javac 1.4, you have to
pass it the "-1.4" argument.
I agree you don't need to pass a "-source 1.4" argument.



                                                                                                                      
                      Takashi Okamoto                                                                                 
                      <toraneko@xxxxxx.        To:       jdt-core-dev@xxxxxxxxxxx, Philippe_Mulet@xxxxxxx             
                      jp>                      cc:                                                                    
                                               Subject:  Re: [jdt-core-dev] SUN vs Eclispe compiler                   
                      11/13/2002 02:22                                                                                
                      PM                                                                                              
                                                                                                                      
                                                                                                                      




From: "Philippe Mulet" <Philippe_Mulet@xxxxxxx>
Subject: Re: [jdt-core-dev] SUN vs Eclispe compiler
Date: Wed, 13 Nov 2002 09:47:09 +0100
> But your first message was using the JDK-1.4.1 javac compiler, which is a
> JDK-1.4 compiler (even though using the '-source 1.3' option).

I use JDK1.4.1_01. Default sun's javac behavior is 1.3 compatible. I
copy from 1.4.1_01's javac man page:

     -source release
                  ... snip ....

              When release is set to 1.3, the compiler  does  not
              support  assertions.  The  compiler defaults to the
              1.3-behavior if the -source flag is not used.

> The Eclipse compiler is by default a JDK-1.3 level compiler.
> So a fair comparison is either javac 1.3 against Eclipse compiler,

I think it fair. I use eclipse compiler with 1.3 compatible
mode. JDK is same as sun's javac and rt.jar is same as sun's.

regards,

Takashi Okamoto








Back to the top