JDK-6423003 : JSR 199: confusing help message with compiler API
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-05-08
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b03Fixed
Related Reports
Relates :  
Description
Confusing help message with compiler API.

<src>
import java.util.Arrays;
import javax.tools.*;

public class T6423003 {
    public static void main(String... arg) throws Throwable {
        JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
        javac.getTask(null, null, null, Arrays.asList("-Xlint:all"), null, null).call();
    }
}
</src>
output of the message:
<output>
bash-3.00$ java T6423003
javacTask: no source files
^^^^^^^^^
Usage: javacTask <options> <source files>
use -help for a list of possible options
</output>

There is some inconsistency between running through command line and running through compiler API  also javacTask will be confusing to the user since its more of internal name.

Comments
EVALUATION We should avoid using the word javacTask and we should probably throw an IllegalStateException.
30-09-2006