/* 
 * Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package org.apache.commons.exec.launcher;

import java.io.File;
import java.io.IOException;
import java.util.Map;

import org.apache.commons.exec.CommandLine;
import org.apache.commons.exec.environment.EnvironmentUtils;

/**
 * A command launcher for JDK/JRE 1.3 (and higher). Uses the built-in
 * Runtime.exec() command
 */
public class Java13CommandLauncher extends CommandLauncherImpl {

    /**
     * Constructor
     */
    public Java13CommandLauncher() {
	}

	/**
	 * Launches the given command in a new process, in the given working
	 * directory
	 * 
	 * @param cmd
	 *            the command line to execute as an array of strings
	 * @param env
	 *            the environment to set as an array of strings
	 * @param workingDir
	 *            the working directory where the command should run
	 * @throws IOException
	 *             probably forwarded from Runtime#exec
	 */
	public Process exec(final CommandLine cmd, final Map env,
			final File workingDir) throws IOException {

		final String[] envVars = EnvironmentUtils.toStrings(env);

		return Runtime.getRuntime().exec(cmd.toStrings(),
                envVars, workingDir);
	}
}

@@ -1278,18 +1278,27 @@
 ) %7B%0A
-%09%7D%0A%0A%09/**%0A%09
+    %7D%0A%0A    /**%0A    
  * L
@@ -1362,17 +1362,20 @@
 working%0A
-%09
+    
  * direc
@@ -1383,14 +1383,20 @@
 ory%0A
-%09 * %0A%09
+     * %0A    
  * @
@@ -1405,17 +1405,20 @@
 ram cmd%0A
-%09
+    
  *      
@@ -1466,33 +1466,36 @@
 rray of strings%0A
-%09
+    
  * @param env%0A%09 
@@ -1492,17 +1492,20 @@
 ram env%0A
-%09
+    
  *      
@@ -1556,17 +1556,20 @@
 strings%0A
-%09
+    
  * @para
@@ -1581,17 +1581,20 @@
 kingDir%0A
-%09
+    
  *      
@@ -1650,17 +1650,20 @@
 uld run%0A
-%09
+    
  * @thro
@@ -1677,17 +1677,20 @@
 ception%0A
-%09
+    
  *      
@@ -1737,14 +1737,20 @@
 xec%0A
-%09 */%0A%09
+     */%0A    
 publ
@@ -1807,11 +1807,20 @@
 nv,%0A
-%09%09%09
+            
 fina
@@ -1860,18 +1860,24 @@
 tion %7B%0A%0A
-%09%09
+        
 final St
@@ -1931,10 +1931,16 @@
 );%0A%0A
-%09%09
+        
 retu
@@ -2027,9 +2027,12 @@
 r);%0A
-%09
+    
 %7D%0A%7D%0A

Replace tabs with spaces