Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.Desktop;
import java.io.File;
import java.io.IOException;

public class Main {
    public static void main(String[] a) {
        try {
            Desktop desktop = null;
            if (Desktop.isDesktopSupported()) {
                desktop = Desktop.getDesktop();
            }

            desktop.edit(new File("c:\\a.txt"));
        } catch (IOException ioe) {
            ioe.printStackTrace();
        }

    }
}