You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Thomas Kluge <m6...@uni-jena.de> on 2011/03/09 18:55:37 UTC

Change the Java Compiler

Hi everybody,

I`d like to compiler the Dacapo Benchmark with the Java 7 Compiler.
The Benchmark uses an ant build script.
I already changed the Java version in my system, but ant uses still the 
Java 6 compiler.
The Java 7 compiler is just the compiler and not a hole virtual machine.
That means I need a possibility to change just the compiler in ordner to 
build the benchmark with ant.
How can i do this (use ant 1.8)?

Thanks for help

-- 
------------
Thomas Kluge
Informatikstudent
Friedrich-Schiller-Universitaet Jena

-- 
------------
Thomas Kluge
Informatikstudent
Friedrich-Schiller-Universitaet Jena


RE: Change the Java Compiler

Posted by "Urena, Jose M" <jo...@verizonbusiness.com>.
ant -Dbuild.executable=c:/jdk170/bin/javac -Dsource=1.7 -Dtarget=1.7 -f
build.xml

build.xml

<property name="build.executable"
value="${JAVA_HOME}${file.separator}bin${file.separator}javac"/>
<property name="ant.build.javac.source" value="${source}"/>
<property name="ant.build.javac.target" value="${target}"/>

<javac srcdir="${source.dir}" destDir="${classes.dir}" 
     debuglevel="${debuglevel}" includes="**${file.separator}*.java"   
     fork="true" memorymaximumsize="512m"
executable="${build.executable}"
     listfiles="no"
     debug="true" optimize="true" deprecation="off"
includeantruntime="true">


or

use -Dbuild.compiler=javac1.7
http://ant.apache.org/manual/Tasks/javac.html


-----Original Message-----
From: Thomas Kluge [mailto:m6klth2@uni-jena.de] 
Sent: Wednesday, March 09, 2011 12:56 PM
To: ant
Subject: Change the Java Compiler

Hi everybody,

I`d like to compiler the Dacapo Benchmark with the Java 7 Compiler.
The Benchmark uses an ant build script.
I already changed the Java version in my system, but ant uses still the
Java 6 compiler.
The Java 7 compiler is just the compiler and not a hole virtual machine.
That means I need a possibility to change just the compiler in ordner to
build the benchmark with ant.
How can i do this (use ant 1.8)?

Thanks for help

--
------------
Thomas Kluge
Informatikstudent
Friedrich-Schiller-Universitaet Jena

--
------------
Thomas Kluge
Informatikstudent
Friedrich-Schiller-Universitaet Jena


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


Re: Change the Java Compiler

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-03-09, Thomas Kluge wrote:

> I`d like to compiler the Dacapo Benchmark with the Java 7 Compiler.
> The Benchmark uses an ant build script.

I assume you can modify the compilation part of said buildfile.

> The Java 7 compiler is just the compiler and not a hole virtual machine.

The easiest approach would be to use forked compilation and specify the
compiler's OS frontend (likely "javac" or "javac.exe") as executable
using the full path.

Stefan

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