JDK-6410811 : Enhance documentation for JavaCompilerTool interface
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-04-10
  • Updated: 2011-02-16
  • Resolved: 2006-04-10
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE PROBLEM :
It could be useful to have one or two example on how to use the JavaCompilerTool interface from the ToolProvider to an actual standard running of the tool on a class file, for example.

What is not very clear in the documentation for this class (and could be helped by a simple example) is the relationship between the run() method for the JavaCompilerTool and the setting of compilation tasks, because the JavaCompilerTool.CompilationTask also have a run() method.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Simple example of how to use the JavaCompilerTool in the two following usecases (if they are really available in the SUN implementation, which is not obvious) :
- compile a simple class on the filesystem
- compile a simple class "on memory"

One of the example should be the simplest, whith the minimum options to set. The second examples should cover the seetings of options through the CompilationTask interface.
ACTUAL -
No example is given on how to use the JavaCompilerTool

URL OF FAULTY DOCUMENTATION :
http://download.java.net/jdk6/docs/api/

Comments
EVALUATION A comprehensive set of examples is planned for beta 2. Early access in either b81 or b83.
10-04-2006