Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.tools.JavaCompiler;
import javax.tools.ToolProvider;

public class Main {
    public static void main(String[] args) {
        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
        int result = compiler.run(null, null, null, "Hello.java");

        System.out.println("Compile result code = " + result);
    }
}