2016-10-17 1 views
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 
+0

그래서 오류가

package xyz; public class SetPoint { public static void main(String args[]){ Point point = new Point(); point.coorX = 10; point.coorY = 20; System.out.println("Coordinate of point: ("+point.coorX+", "+point.coorY+")"); } } 
adamreeve

+0

"javac SetPoint.java"만 사용했습니다. – osxfloo

+1

그래, 그럼 엘리엇의 대답은 정확합니다 :) – adamreeve

답변

3

동시에 두 자바 파일을 컴파일

을 발생? 사용중인 명령을 공유 할 수 있습니까?
관련 문제