Check for Classes which are new in that specific JDK.
    <available property="jdk1.5+" classname="java.net.Proxy"/>
    <available property="jdk1.6+" classname="java.util.ServiceLoader"/>
    <fail message="Require JDK 1.5 or higher" unless="jdk1.5+"/>

Jan 

>-----Ursprüngliche Nachricht-----
>Von: Ben Stover [mailto:[email protected]] 
>Gesendet: Dienstag, 27. Juli 2010 14:35
>An: Ant Users
>Betreff: How to check if available java version is higher 
>equal than a required java version?
>
>Assume I have a build.xml which contains some java tasks 
>(javac, jar,...)
>
>I would like to make sure that the Java installation which is 
>used to compile the source code is higher equal
>than e.g. JAVA SE 1.5.03.
>
>How can I specify this version requirement (and an appropriate 
>error message) in a build.xml script?
>
>Ben
>
>
>
>
>
>
>---------------------------------------------------------------------
>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]

Reply via email to