Browse Source

Find the java executable accordining to standard Ant rules

PR:	17145


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274115 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 22 years ago
parent
commit
7486f7115d
4 changed files with 12 additions and 8 deletions
  1. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
  2. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
  3. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
  4. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java

+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java View File

@@ -1,7 +1,7 @@
/*
* 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.
*
* 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.CommandlineJava;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.util.JavaEnvUtils;

/**
* Runs the JJTree compiler compiler.
@@ -200,7 +201,7 @@ public class JJTree extends Task {
}

public JJTree() {
cmdl.setVm("java");
cmdl.setVm(JavaEnvUtils.getJreExecutable("java"));
cmdl.setClassname("COM.sun.labs.jjtree.Main");
}



+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java View File

@@ -1,7 +1,7 @@
/*
* 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.
*
* 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.CommandlineJava;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.util.JavaEnvUtils;

/**
* JavaCC compiler compiler task.
@@ -270,7 +271,7 @@ public class JavaCC extends Task {
}

public JavaCC() {
cmdl.setVm("java");
cmdl.setVm(JavaEnvUtils.getJreExecutable("java"));
cmdl.setClassname("COM.sun.labs.javacc.Main");
}



+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java View File

@@ -1,7 +1,7 @@
/*
* 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.
*
* 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.Path;
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.
@@ -118,7 +119,7 @@ public abstract class AbstractMetamataTask extends Task {

/** initialize the task with the classname of the task to run */
protected AbstractMetamataTask(String className) {
cmdl.setVm("java");
cmdl.setVm(JavaEnvUtils.getJreExecutable("java"));
cmdl.setClassname(className);
}



+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java View File

@@ -1,7 +1,7 @@
/*
* 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.
*
* 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.types.Commandline;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.util.JavaEnvUtils;

/**
* Simple Metamata MParse task.
@@ -114,7 +115,7 @@ public class MParse extends AbstractMetamataTask {
}

public MParse() {
cmdl.setVm("java");
cmdl.setVm(JavaEnvUtils.getJreExecutable("java"));
cmdl.setClassname("com.metamata.jj.MParse");
}



Loading…
Cancel
Save