JavaCompiler not compiling files properly

Detection score: 5.0

<p>I have a similar issue. I get also the error <strong>error: cannot find symbol</strong> but I use my own interface that the class should implements.<br>
 My class looks like:<br></p>

<pre><code>   String className = "refac.MyClass"; 
   String javaCode = "package refac;\n" +
               "import refac.IBewertungsAlgorithmus;\n" +
                  "public class MyClass implements IBewertungsAlgorithmus{\n" +
                       "    public Boolean Bewertung (int checkliste){\n" +
                        "        System.out.println(\"Hello World\");\n" +
                        "        return false;   }\n" +

<p><br> I get this compilation error: <br></p>

<pre><code>[/refac/ error: cannot find symbol
import refac.IBewertungsAlgorithmus;
  symbol:   class IBewertungsAlgorithmus
  location: package refac, /refac/ error: cannot find symbol
public class MyClass implements IBewertungsAlgorithmus{
  symbol: class IBewertungsAlgorithmus]

The class and the interface are in the same package - seemingly.<br><br>
<strong>System.getProperty("java.class.path")</strong> returns <br>
This isn't the project path. How do I get the class path of an web projekt?</p>
Posted 5 months ago | reported 5 months ago
Posted by Tokra (6)

Caught by 3 reasons: