We all know that javac command is used to compile the java classes. Even if we are using some IDE (Eclipse, JBuilder, NetBeans), javac is called at the background for compilation. But with the release of Java 6, it has become possible to compile Java class from a Java class.
The classes related to Java compiler are packed into javax.tools package.
There is a class called ToolProvider (javax.tools) whose getSystemJavaCompiler() method returns an instance of some class