2
컴파일 : 내가 거기 오류라는 이름의 파일 SetPoint.java을 컴파일 할 때 자바 코드 오류
SetPoint.java:5: error: cannot find symbol
Point point = new Point();
^
symbol: class Point
location: class SetPoint
SetPoint.java:5: error: cannot find symbol
Point point = new Point();
^
symbol: class Point
location: class SetPoint
2 errors
내가 XYZ라는 이름의 폴더에이 두 개의 파일 (Point.java 및 SetPoint.java)가 있습니다. 내가 뭘 잘못하고 있는지 모르겠다. IntelliJ에서 동일한 작업을 수행하면 올바르게 작동합니다.
package xyz;
public class Point {
int coorX;
int coorY;
}
. 명령 줄에서 컴파일 할 때
javac *.java
또는
javac SetPoint.java Point.java
그래서 오류가
– adamreeve"javac SetPoint.java"만 사용했습니다. – osxfloo
그래, 그럼 엘리엇의 대답은 정확합니다 :) – adamreeve