Next, I'm trying to get a Java compiler instance through the following code:
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
if (compiler == null) {
System.out.println("No compiler");
return;
}
The problem is that it always falls into if, and I can not understand why.
I want to know what I'm doing wrong.