Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.FileOutputStream;

public class Main {

    public synchronized static void writeCh(String path, String cmd) {
        try {
            cmd = cmd + "\n";
            FileOutputStream out = new FileOutputStream(path, true);
            out.write(cmd.getBytes());
            out.close();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}