<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Java compiler - Page 5 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Java_compiler&amp;p=4">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Java_compiler&amp;p=6">3.Next</a>
</p>
<p>       File sourceFile = new File(TEST_FILE_NAME);        if (!sourceFile.exists()) {            throw new IllegalArgumentException(String.format("File path %s does not exist!", TIME_FILE_NAME));        }        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();</p>

<p>        if (compiler == null) {            throw new RuntimeException("Compiler not available. Are you running on a JRE instead of a JDK?");        }</p>

<p>        int result = compiler.run(null, null, null, sourceFile);</p>

<p>        System.out.printf("Compilation</p><p>
<a accesskey="1" href="page.php?w=Java_compiler&amp;p=4">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Java_compiler&amp;p=6">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
