Facebook Page Twitter Page LinkedIn Page
× Java.lang Package Classes


Java Compiler Class

Java.lang package provides a Compiler class which is provided to support Java-to-native-code compilers and related services. By design, the Compiler class does nothing; it serves as a placeholder for a JIT compiler implementation.

Class declaration

The declaration of java.lang.Compiler class is:

public final class Compiler
  extends Object

java.lang.Compiler Methods

The java.lang.Compiler class has a number of methods which are listed below:

Member Methods

S.NMethods & Description
1. static Object command(Object any)
Examines the argument type and its fields and perform some documented operation.
2. static boolean compileClass(Class<?> clazz)
Compiles the specified class.
3. static boolean compileClasses(String string)
Compiles all classes whose name matches the specified string.
4. static void disable()
Cause the Compiler to cease operation.
5. static void enable()
Cause the Compiler to resume operation.

Methods inherited

This class inherits the methods of following class:

  • java.lang.Object

5