-3
는이 코드 작성 :일식이 표준 라이브러리를 읽을 수 없습니까?
public class CheckerBoard {
public static void main(String[] args) {
// declaration and initialization - How big?
int N = Integer.parseInt(args[0]);
StdDraw.setXscale(0, N);
StdDraw.setYscale(0, N);
// Draw from lower left, up and across
// i is the index for the x value. j is the index for y.
for (int i = 0; i < N; i++) {
for (int j = 0; j<N; j++) {
if (((i+j) % 2)==0){
StdDraw.setPenColor(StdDraw.BLACK);
else StdDraw.setPenColor(StdDraw.RED);
StdDraw.filledSquare(1, 1 , 0.5);
}
}
StdDraw.show();
}
을 그리고 결과에 보여줍니다
StdDraw cannot be resolved
at CheckerBoard.main(CheckerBoard.java:15)
내가 이미 윈도우 환경 설정 - 자바 일에 std.lib을 추가했다. 아무도 그 문제가 뭔지 알고 있습니까?
eclipse가 클래스 경로에서 jar 파일을 인식 할 수 없습니다. –
'Build Path'에 있습니까? –
아니야. 라이브러리를 빌드 경로에 어떻게 추가합니까? – msd