안녕하셨습니까?
포스트그레스용 jdbc를 찾아서 설치해준후 간단한 프로그램을 만들어서 컴파일해봤는데요.. 다음과 같이 에러가 나네요.. 소스상의 문제는 아닌듯 하구요... 왜냐면 예제에 나온것을 알맞게 수정해서요 게다가 라인도 얼마 안돼구요 몇번씩 살펴봤거든요... CLASSPATH도 지정해 주었는데 찾지를 못하는것 같으니..
혹 아시면 답을 좀. ^^;
다음이 에러메세지입니다.
first.java:19: Exception java.lang.ClassNotFoundException must be caught, or it
must be declared in the throws clause of this method.
Class.forName("postgresql.Driver");
^
first.java:21: Method getConnection(java.lang.String, java.lang.String, java.lan
g.String) not found in interface java.sql.Driver.
Connection db = Driver.getConnection("jdbc:postgresql://sosworld
.co.kr:5432/world","nobody","");
^
first.java:23: Exception java.sql.SQLException must be caught, or it must be dec
lared in the throws clause of this method.
Statement st = db.createStatement();
^
Note: first.java uses or overrides a deprecated API. Please consult the documen
tation for a better alternative.
3 errors, 1 warning
|