Bug 39027 - Ant does not build on GNU Classpath (wrong java version detected)
Summary: Ant does not build on GNU Classpath (wrong java version detected)
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: nightly
Hardware: All other
: P2 blocker (vote)
Target Milestone: 1.7.0
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-18 12:54 UTC by Guilhem Lavaux
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guilhem Lavaux 2006-03-18 12:54:22 UTC
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
Comment 1 Matt Benson 2006-03-18 18:41:51 UTC
Probably because it would require (unreliable) parsing of the version number.
Comment 2 Guilhem Lavaux 2006-03-18 19:39:09 UTC
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.
Comment 3 Steve Loughran 2006-03-19 21:09:19 UTC
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. 
Comment 4 Guilhem Lavaux 2006-03-26 12:11:10 UTC
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 ?
Comment 5 J.M. (Martijn) Kruithof 2006-03-26 15:05:28 UTC
Fixed
Comment 6 Guilhem Lavaux 2006-03-27 21:37:33 UTC
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"/>
Comment 7 J.M. (Martijn) Kruithof 2006-03-27 22:01:42 UTC
Also changed that one,

I thought for building Ant, kaffe was treated as jdk 1.5 with an exclusion on
isReachable