Fix that Java: Uncompiling Compiler


Though, the following challenge seems easy, we have some restrictions. Unfortunatelly, the source codes of Main and JavaCompiler are not in our hands.

class Main {
    public static void main(String[] args) {
       JavaCompiler compiler = new JavaCompiler("hello.java");
       compiler.compile();
    }
}
class JavaCompiler implements Compiler {
    private String path;

    JavaCompiler(String path) {
        this.path = path;
    }

    String getPath() {
        return path;
    }
}
interface Compiler {
    void compile();
}

Take care of the code, and make it work!