java.lang.Compiler.compileClasses() java.lang.Compiler.disable() java.lang.Compiler.enable() java.lang.Compiler.compileClasses() package com.codingdict; import java.lang.*; public class CompilerDemo { public static void main(String[] args) { CompilerDemo cls = new CompilerDemo(); CompilerDemo subcls = new SubClass1(); // class CompilerDemo Class c = cls.getClass(); System.out.println(c); // sub class SubClass1 Class c1 = subcls.getClass(); System.out.println(c1); /* returns false if the compilation failed or no compiler is available */ String str = "CompilerDemo"; boolean retval = Compiler.compileClasses(str); System.out.println("Return Value = " + retval); } } class SubClass1 extends CompilerDemo { // sub class } java.lang.Compiler.disable() java.lang.Compiler.enable()