ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hakan Koseoglu" <>
Subject Re: Print exact version of jvm (java -version)
Date Thu, 08 Jun 2006 11:34:22 GMT
On 6/8/06, Mikael Petterson (KI/EAB) <> wrote:
> How can I print what compiler is used ( exact version like 'java
> -version') when compiling?
Probably the easiest way is creating a new task stuffed with all sorts
of information you want to log and calling it as a task:

The following compiles but I haven't tested it.

package org.isageek.m1fcj.dummy;


public class SysInfo extends Task {

    public void execute() {
     // iterator over the conditions
    	      log("java class version: "+System.getProperty("java.class.version"));
    	      log("java vendor:        "+System.getProperty("java.vendor"));
    	      log("java vendor url:    "+System.getProperty("java.vendor.url"));
    	      log("java version:       "+System.getProperty("java.version"));
    	      log("OS architecture:    "+System.getProperty("os.arch"));
    	      log("OS name:            "+System.getProperty(""));
    	    catch (Throwable t)
    	    	log ("ooops...");

Hakan (m1fcj)

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

View raw message