`
岩城天壹
  • 浏览: 28878 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Use Java to run kitchen

    博客分类:
  • Java
阅读更多

Cmd.java

package com.simonftxy.core;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;

public class Cmd {

	public static void main(String[] args) {
		String cmd = "cmd /c kitchen.bat /file:G:\\TDDOWNLOAD\\Dev\\Data_Integration\\ae_demo\\Sample.kjb /level:Detailed >> H:\\1.log";
		File execPath = new File("G:/TDDOWNLOAD/Dev/Data_Integration/pdi-4.3.0");
		try {
			Process pro = Runtime.getRuntime().exec(cmd, null, execPath);

			BufferedReader input = new BufferedReader(new InputStreamReader(pro.getInputStream(), "GB2312"));
			String msg = null;
			while ((msg = input.readLine()) != null) {
				System.out.println(msg);
			}

			int exitVal = pro.waitFor();
			System.out.println("Exited with error code: " + exitVal);
		} catch (IOException e) {
			e.printStackTrace();
		} catch (InterruptedException e) {
			System.out.println(e);
			e.printStackTrace();
		}
	}
}
 
分享到:
评论

相关推荐

    SPSS Python Extension function to use Mplus to run a path analys

    SPSS Python Extension function to use Mplus to run a path analysis from within SPSS

    JNative : Java to native interface

    JNI jar包 This library allows developers to access native libraries ... You do NOT need to compile a line of C/C++ to use it: it's dynamic !! Now Win32 DLL and shared libraries are usable with Java ;)

    使用java 和 javafx完成的击落陨石的小游戏(Use java and javafx to complete the shooting down of meteorites).zip

    使用java 和 javafx完成的击落陨石的小游戏(Use java and javafx to complete the shooting down of meteorites).zip

    Exe.rar_java exe_run

    描述中提到,“this code maked the use of java to run any exe file”,表明这个代码实现了通过Java来调用并执行任何Windows平台下的EXE程序。在Java中,这个功能通常涉及到使用`Runtime`类或`ProcessBuilder`类来...

    editplus use for java or c++

    用于JAVA开发的一个开发工具用于JAVA开发的一个开发工具用于JAVA开发的一个开发工具用于JAVA开发的一个开发工具用于JAVA开发的一个开发工具用于JAVA开发的一个开发工具用于JAVA开发的一个开发工具

    Java: A Beginners Complete Reference Guide to Learn The Java Programming

    You’ll even learn to use IntelliJ, a Java IDE (Integrated Development Environment) that professional developers use, to build, compile, and debug your code. These are fundamental programming skills,...

    [Java] Java 编程面试揭秘 英文版

    Use the appendix for tips on Scala and Groovy two other languages that run on JVMs Veterans of the IT employment space know that interviewing for a Java programming position isn"t as simple as ...

    Java.8.Recipes.2nd.Edition

    C and C++ Java was designed to be more intuitive and easier to use than older languages specifically due to its simplistic object model and automated facilities such as memory management At the time ...

    Introduction to Programming in Java

    basic tools necessary to use computation effectively. Our approach is to teach stu- dents that writing a program is a natural, satisfying, and creative experience (not an onerous task reserved for ...

    java实验7.1(CollegeCourse.java)

    Run the example by going to c:\java\lab7 and typing: java ynu/edu/lab7/UseCourse For example, the output could be: The cost of your course is $180.0 there is a $25.00 lab fee. The cost of your ...

    Java Projects

    You’ll see how to use the Java runtime tools, understand the Java environment, and create a simple namesorting Java application. Further on, you’ll learn about advanced technologies that Java ...

    基于 Java 实现的复杂网络建模课程设计

    【作品名称】:基于 Java 实现的复杂网络建模课程设计 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期...Simple Code, Use Java's Drawing Pack.

    Sams Teach Yourself Java in 21 Days(Covering Java 8) 7th 2016第7版 0分

    Completely updated for Java 8, this book teaches you about the Java language and how to use it to create applications for any computing environment and Android apps. By the time you have finished the ...

    Android代码-MiniJava

    To run the tests $ java -jar minijava-standalone.jar FOR THE GROUP: To build the java code and download deps: $ ant $ lein deps To start a slime server: $ lein swank To run the tests: $ lein test Don'...

Global site tag (gtag.js) - Google Analytics