Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.OutputStream;

public class Main {
    public static void main(String[] argv) throws Exception {
        String command = "cat";
        Process child = Runtime.getRuntime().exec(command);

        OutputStream out = child.getOutputStream();

        out.write("some text".getBytes());
        out.close();
    }
}