Maybe this helps: <target name="@check-jre1.5"> <condition property="is.jre15"> <and> <equals arg1="Sun Microsystems Inc." arg2="${java.vendor}" /> <contains substring="1.5.0" string="${java.runtime.version}" /> </and> </condition> <fail message="Distributions must be built with Sun JDK 1.5.0. Aborting." unless="is.jre15" /> </target>
-peter On Dec 13, 2007 5:10 PM, Steve Loughran <[EMAIL PROTECTED]> wrote: > > Here's a question. How do I distinguish a sun jvm from a jrockit jvm in > a build file, as I dont see any reliable way of doing it in an ant > condition (right now)? > > I'm thinking we ought to analyse the jvm and maybe set some properties, > or add a new <jvmversion> condition to probe the world. > > -steve > > (I have some tests that fail on JRockit as it handles tail recursion > differently; a test that would normally stack overflow spins until 4GB > of heap runs out, which can take a long time. I'd rather detect jrockit > and skip it, but the only test I have uses <contains> on the bootpath > and hopes that jrockit is only installed in a path with that in it.... > > --------------------------------------------------------------------- > 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]