ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Arrenbrecht" <>
Subject Re: getting JVM version info from Ant
Date Thu, 13 Dec 2007 16:14:07 GMT
Maybe this helps:

	<target name="@check-jre1.5">
		<condition property="is.jre15">
				<equals arg1="Sun Microsystems Inc." arg2="${java.vendor}" />
				<contains substring="1.5.0" string="${java.runtime.version}" />
		<fail message="Distributions must be built with Sun JDK 1.5.0.
Aborting." unless="is.jre15" />


On Dec 13, 2007 5:10 PM, Steve Loughran <> 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:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message