EnumAlternateJavaCompilers.java Source code

Java tutorial

Introduction

Here is the source code for EnumAlternateJavaCompilers.java

Source

import java.util.ServiceLoader;

import javax.tools.JavaCompiler;

public class EnumAlternateJavaCompilers {
    public static void main(String[] args) {
        ServiceLoader<JavaCompiler> compilers;
        compilers = ServiceLoader.load(JavaCompiler.class);
        System.out.println(compilers.toString());

        for (JavaCompiler compiler : compilers)
            System.out.println(compiler);
    }
}