Ant is using available classes to detect the currently available java version. However this is wrong as standard GNU Classpath includes some Java 1.5 classes but is not Java 1.5 (rather Java 1.4). Why not using the property java.version directly ? You can see the current logs on http://gump.zones.apache.org/gump/kaffe/ant/bootstrap-ant/gump_work/buildscript_ant_bootstrap-ant.html
Probably because it would require (unreliable) parsing of the version number.
Another option is to check other classes which are really relying on Java 1.5 features (like enums, generics, ...) I have heard it is the case for java.net.Proxy for example.
All we need is a java1.5 class that is always there, doesnt have bad consequences, and can be checked for in language-neutral java source.
If you check for java.net.Proxy it will be ok for us (Classpath). java.net.Proxy will never be shipped except when we will have full 1.5 support. So could someone with write access change the used class ?
Fixed
You also have to update the root build.xml file. <target name="check_for_optional_packages"> <available property="jdk1.3+" classname="java.lang.StrictMath"/> <available property="jdk1.4+" classname="java.lang.CharSequence"/> ===> this one <available property="jdk1.5+" classname="java.lang.Readable"/> <=== <available property="jdk1.6+" classname="java.util.Service"/> <available property="kaffe" classname="kaffe.util.NotImplemented"/>
Also changed that one, I thought for building Ant, kaffe was treated as jdk 1.5 with an exclusion on isReachable