我正在尝试编译我的类以及提供的 .jar 文件,其中包含我的类将使用的类。
这是我一直在尝试的:
javac -classpath .:WordSearch.jar WordSearchSolver.java
这是回应:
WordSearchSolver.java:16: cannot find symbol
symbol : class PuzzleWord
location: class WordSearchSolver
public ArrayList<PuzzleWord> findwords()
^
WordSearchSolver.java:18: cannot find symbol
symbol : class PuzzleWord
location: class WordSearchSolver
return new ArrayList<PuzzleWord>();
^
2 个错误
这是我的课:
import java.util.ArrayList;
public class WordSearchSolver
{
public WordSearchSolver(int size, char[][] puzzleboard, ArrayList<String> words)
{
}
public ArrayList<PuzzleWord> findwords()
{
return new ArrayList<PuzzleWord>();
}
}
WordSearch.jar 包含:
PuzzleUI.class
PuzzleWord$Directions.class
PuzzleWord.class
Natural.class
(WordSearchSolver.java 和 Wordsearch.jar 在同一个目录下)
我错过了什么吗?