zoukankan      html  css  js  c++  java
  • java运行可以执行文件

    # package com.yymt.pf.rpc.loadbalance;  
    #   
    # import java.io.File;  
    # import java.io.IOException;  
    #   
    # public class ExecFileUtil {  
    #     public static void main(String[] args) throws IOException {  
    #         run("cmd /C start startup.bat", null, new File(  
    #                 "E:\\develop_tools\\apache-tomcat-6.0.26\\bin\\"));  
    #         System.out.println("Started!");  
    #     }  
    #   
    #     /** 
    #      * @param path 
    #      *            a specified system command 
    #      * @param envp 
    #      *            array of strings, each element of which has environment 
    #      *            variable settings in the format name=value, or null if the 
    #      *            subprocess should inherit the environment of the current 
    #      *            process. 
    #      * @param dir 
    #      *            the working directory of the subprocess, or null if the 
    #      *            subprocess should inherit the working directory of the current 
    #      *            process. 
    #      * @return 
    #      * @throws IOException 
    #      */  
    #     public static Process run(String cmd, String[] envp, File dir)  
    #             throws IOException {  
    #         Runtime rt = Runtime.getRuntime();  
    #         return rt.exec(cmd, envp, dir);  
    #     }  
    #   
    # } 
     
  • 相关阅读:
    Git

    学而不记则徒劳无功
    Redis基础
    哈希表
    第一个Python程序
    Python 环境搭建 基于 Windows
    执行数据库的插入操作 insert
    Eclipse连接到My sql数据库的操作总结/配置数据库驱动
    数据库 (一)
  • 原文地址:https://www.cnblogs.com/qq1988627/p/6606876.html
Copyright © 2011-2022 走看看