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" +
                    "}\n";
</code></pre>

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

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

<p><br>
The class and the interface are in the same package - seemingly.<br><br>
<strong>System.getProperty("java.class.path")</strong> returns <br>
C:\Users\Plath\Axon\Neu\AxonIvyDesigner\AxonIvyDesigner6.7.1.55496_Windows_x64\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar;<br><br>
This isn't the project path. How do I get the class path of an web projekt?</p>
Posted 2 months ago | reported 2 months ago
Posted by Tokra (6)

Caught by 3 reasons: