Java File Attribute fileExecute(String path)

Here you can find the source of fileExecute(String path)

Description

file Execute

License

Open Source License

Declaration

public static void fileExecute(String path) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.IOException;

public class Main {
    public static void fileExecute(String path) {
        //String command = "cmd /c start " + "\"" + path + "\"";
        try {/*  w w  w . j  a  va2  s  .  com*/
            Process child = Runtime.getRuntime().exec(new String[] { "cmd.exe", "/c", path });
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Related

  1. checkIfExecutableIsInPATH(final String executableName)
  2. doesExecutableExist(String executablePath)
  3. ensureExecutable(final File file)
  4. ensureExecutable(IPath path)
  5. ensureFileIsExecutable(String filename)
  6. findInPath(String executable, String path, String pathSeparator)
  7. findJavaCompilerExecutableInDir(File dir)
  8. findJavaExecutable(File vmInstallLocation)
  9. findUnixExecutable(String unixCommandLineExecutables)