私は同様の問題をJavaCompiler not compiling files properlyとしています。私もエラーエラー:シンボルを見つけることができませんが、私はクラスが実装する必要が私自身のインターフェイスを使用します。私はこのコンパイル・エラーが発生します
JavaCompilerがシンボルを見つけることができません
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";
: - 一見
[/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]
クラスとインタフェースが同じパッケージ内にある
私のクラスは次のようになります。
はSystem.getProperty( "のjava.class.path")戻り
C:\ Users \ユーザーPlath \アクソン\ノイ\ AxonIvyDesigner \ AxonIvyDesigner6.7.1.55496_Windows_x64 \プラグイン/ org.eclipse.equinox.launcher_1.3.0 .v20140415-2008.jar;
これはプロジェクトパスではありません。ウェブプロジェクトのクラスパスを取得するにはどうすればよいですか?