ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Arrenbrecht" <peter.arrenbre...@gmail.com>
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">
			<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 <stevel@apache.org> 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: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message