Re: 1.1 still hanging about??

2004-10-19 Thread Stefan Bodewig
On Tue, 19 Oct 2004, Niclas Hedhman [EMAIL PROTECTED] wrote:

 Anyone has any clue what this is?

Yes.

If you use javac without a target attribute, Ant won't use the
-target command line switch.  Sun changed the default of -target 1.3
to -target 1.4 with JDK 1.4 so many builds switched to specifying
target=1.1 to create classes that can be used on older JDKs.

Now the same happens to the source attribute.  If you leave it off,
Ant won't pass -source to the compiler.  In JDK 1.4 the default for
-source has been 1.3 which means -target 1.1 is fine (and thus nobody
specified the source attribute).  With JDK 1.5 they changed the
default to 1.4 and then a 

javac target=1.1/

will use -target 1.1 -source 1.4 implicitly on JDK 1.5 which is an
incompatible combination of argument.

To make things worse, -target 1.1 -source 1.3 doesn't work for JDK 1.5
either IIRC and at the same time -source doesn't allow 1.2 or 1.1 in
JDK 1.4 so you need to do something silly like the Ant build file

  target name=javac.preset depends=javac.preset.1.5+,javac.preset.1.5-/
  target name=javac.preset.1.5+ depends=check_for_optional_packages
  if=jdk1.5+
presetdef name=javac.preset
  javac source=${javac.source}/
/presetdef
  /target
  target name=javac.preset.1.5- depends=check_for_optional_packages
  unless=jdk1.5+
presetdef name=javac.preset
  javac/
/presetdef
  /target

in order to support all JDKs properly.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 1.1 still hanging about??

2004-10-19 Thread Stefano Mazzocchi
Stefan Bodewig wrote:
On Tue, 19 Oct 2004, Niclas Hedhman [EMAIL PROTECTED] wrote:

Anyone has any clue what this is?

Yes.
If you use javac without a target attribute, Ant won't use the
-target command line switch.  Sun changed the default of -target 1.3
to -target 1.4 with JDK 1.4 so many builds switched to specifying
target=1.1 to create classes that can be used on older JDKs.
Now the same happens to the source attribute.  If you leave it off,
Ant won't pass -source to the compiler.  In JDK 1.4 the default for
-source has been 1.3 which means -target 1.1 is fine (and thus nobody
specified the source attribute).  With JDK 1.5 they changed the
default to 1.4 and then a 

javac target=1.1/
will use -target 1.1 -source 1.4 implicitly on JDK 1.5 which is an
incompatible combination of argument.
To make things worse, -target 1.1 -source 1.3 doesn't work for JDK 1.5
either IIRC and at the same time -source doesn't allow 1.2 or 1.1 in
JDK 1.4 so you need to do something silly like the Ant build file
  target name=javac.preset depends=javac.preset.1.5+,javac.preset.1.5-/
  target name=javac.preset.1.5+ depends=check_for_optional_packages
  if=jdk1.5+
presetdef name=javac.preset
  javac source=${javac.source}/
/presetdef
  /target
  target name=javac.preset.1.5- depends=check_for_optional_packages
  unless=jdk1.5+
presetdef name=javac.preset
  javac/
/presetdef
  /target
Can't Ant work around this by itself?
--
Stefano.


smime.p7s
Description: S/MIME Cryptographic Signature


1.1 still hanging about??

2004-10-18 Thread Niclas Hedhman

I am looking at this, and it seems that there is a binary incompatibility of 
JDK1.1 vs JDK1.5 classes involving the JDK1.5 run of Gump for the 
jakarta-commons-lang package.

Details;
http://brutus.apache.org/gump/jdk15/jakarta-commons/commons-lang/gump_work/build_jakarta-commons_commons-lang.html


Anyone has any clue what this is?


Cheers
Niclas
-- 
   +--//---+
  / http://www.bali.ac/
 / http://niclas.hedhman.org / 
+--//---+


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]