package filerun;

import java.io.File;
import java.io.IOException;

public class RunExe {

    public static void main(String[] args) {
        // TODO Auto-generated method stub

        
        Runtime run  = Runtime.getRuntime();
        
        File f  = new File("E:\\QQMusic","QQMusic.exe");
        
        
        System.out.println(f.getAbsolutePath());
        
        try {
            run.exec(f.getAbsolutePath());
            System.out.println("运行成功");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
        
        
    }

}

 

相关文章:

  • 2021-10-13
  • 2021-11-19
  • 2022-01-13
  • 2022-12-23
  • 2021-07-28
  • 2021-09-22
  • 2021-09-11
  • 2021-12-12
猜你喜欢
  • 2022-01-29
  • 2023-03-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-14
  • 2022-01-08
  • 2021-10-01
相关资源
相似解决方案