PR: 17145 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274115 13f79535-47bb-0310-9956-ffa450edef68master
@@ -1,7 +1,7 @@ | |||||
/* | /* | ||||
* The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
* | * | ||||
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights | |||||
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights | |||||
* reserved. | * reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
@@ -66,6 +66,7 @@ import org.apache.tools.ant.taskdefs.LogStreamHandler; | |||||
import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
import org.apache.tools.ant.util.JavaEnvUtils; | |||||
/** | /** | ||||
* Runs the JJTree compiler compiler. | * Runs the JJTree compiler compiler. | ||||
@@ -200,7 +201,7 @@ public class JJTree extends Task { | |||||
} | } | ||||
public JJTree() { | public JJTree() { | ||||
cmdl.setVm("java"); | |||||
cmdl.setVm(JavaEnvUtils.getJreExecutable("java")); | |||||
cmdl.setClassname("COM.sun.labs.jjtree.Main"); | cmdl.setClassname("COM.sun.labs.jjtree.Main"); | ||||
} | } | ||||
@@ -1,7 +1,7 @@ | |||||
/* | /* | ||||
* The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
* | * | ||||
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights | |||||
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights | |||||
* reserved. | * reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
@@ -64,6 +64,7 @@ import org.apache.tools.ant.taskdefs.Execute; | |||||
import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
import org.apache.tools.ant.util.JavaEnvUtils; | |||||
/** | /** | ||||
* JavaCC compiler compiler task. | * JavaCC compiler compiler task. | ||||
@@ -270,7 +271,7 @@ public class JavaCC extends Task { | |||||
} | } | ||||
public JavaCC() { | public JavaCC() { | ||||
cmdl.setVm("java"); | |||||
cmdl.setVm(JavaEnvUtils.getJreExecutable("java")); | |||||
cmdl.setClassname("COM.sun.labs.javacc.Main"); | cmdl.setClassname("COM.sun.labs.javacc.Main"); | ||||
} | } | ||||
@@ -1,7 +1,7 @@ | |||||
/* | /* | ||||
* The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
* | * | ||||
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights | |||||
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights | |||||
* reserved. | * reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
@@ -71,6 +71,7 @@ import org.apache.tools.ant.types.CommandlineJava; | |||||
import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
import org.apache.tools.ant.util.JavaEnvUtils; | |||||
/** | /** | ||||
* Somewhat abstract framework to be used for other metama 2.0 tasks. | * Somewhat abstract framework to be used for other metama 2.0 tasks. | ||||
@@ -118,7 +119,7 @@ public abstract class AbstractMetamataTask extends Task { | |||||
/** initialize the task with the classname of the task to run */ | /** initialize the task with the classname of the task to run */ | ||||
protected AbstractMetamataTask(String className) { | protected AbstractMetamataTask(String className) { | ||||
cmdl.setVm("java"); | |||||
cmdl.setVm(JavaEnvUtils.getJreExecutable("java")); | |||||
cmdl.setClassname(className); | cmdl.setClassname(className); | ||||
} | } | ||||
@@ -1,7 +1,7 @@ | |||||
/* | /* | ||||
* The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
* | * | ||||
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights | |||||
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights | |||||
* reserved. | * reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
@@ -66,6 +66,7 @@ import org.apache.tools.ant.taskdefs.ExecuteStreamHandler; | |||||
import org.apache.tools.ant.taskdefs.LogStreamHandler; | import org.apache.tools.ant.taskdefs.LogStreamHandler; | ||||
import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
import org.apache.tools.ant.util.JavaEnvUtils; | |||||
/** | /** | ||||
* Simple Metamata MParse task. | * Simple Metamata MParse task. | ||||
@@ -114,7 +115,7 @@ public class MParse extends AbstractMetamataTask { | |||||
} | } | ||||
public MParse() { | public MParse() { | ||||
cmdl.setVm("java"); | |||||
cmdl.setVm(JavaEnvUtils.getJreExecutable("java")); | |||||
cmdl.setClassname("com.metamata.jj.MParse"); | cmdl.setClassname("com.metamata.jj.MParse"); | ||||
} | } | ||||