| package javax.tools
|
Java SE 6 |
Provides interfaces for tools which can be invoked from a Java program, for example, Java compilers. These interfaces and classes are required as part of Java SE, but there is no requirement to provide any tools implementing them. Unless explicitly allowed, all methods in this package might
throw a java.lang.NullPointerException if given a
This package is the home of the Java Compiler Framework. This framework allows clients of the framework to locate and run Java compilers from Java programs. The framework also provides Service Provider Interfaces (SPI) for structured access to diagnostics (javax.tools.DiagnosticListener) as well as a file abstraction for overriding file access (javax.tools.JavaFileManager and javax.tools.JavaFileObject). See javax.tools.JavaCompiler for more details on using the SPI. There is no requirement for a compiler at runtime. However, if a default compiler is provided, it can be located using the javax.tools.ToolProvider, for example:
It is possible to provide alternative Java compilers or tools through the service provider mechanism. For example, if
If the jar file is on the class path, VendorJavaCompiler can be located using code like this:
|
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|