Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String[] args) throws Exception {
        String fileName = "c:\\temp\\test.bmp";
        String[] commands = { "cmd.exe", "/c", "start", "\"DummyTitle\"", "\"" + fileName + "\"" };
        Process p = Runtime.getRuntime().exec(commands);
        p.waitFor();
        System.out.println("Done.");
    }
}