public ConfRead(String fileName) {
this.fileName = fileName;
try {
java.net.URL url = ConfRead.class.getClassLoader().getResource(fileName);
fis = url.openStream();
isr = new InputStreamReader(fis);
br = new BufferedReader(isr);
}
catch (FileNotFoundException ex) {
System.err.println(fileName + " 파일 읽기 오류 : \n" + ex);
}
catch (IOException ex1) {
}
}
package kinotl.server.game;
import kinotl.client.game.store.*;
import java.io.*;
public class MapLoader {
static final MapData[] getMapList() {
File map_loader = new File(MapLoader.class.getResource("MapLoader.class").getPath()),
data_directory = new File(map_loader.getParent() + "\data");
System.out.println("map_loader : " + map_loader.getPath());
System.out.println("data_directory : " +data_directory.getPath());
if( data_directory.isDirectory() ) {
System.out.println("data is a directory.");
}
String[] file_list = data_directory.list();
for(String file_name : file_list ) {
System.out.println(file_name);
}
return null;
}
public static void main(String[] args) {
MapLoader.getMapList();
}
}
JAVA DB연결 (0) | 2007.12.13 |
---|---|
JAVA 에러대처 (0) | 2007.12.13 |
[ajax] 응용프로그렘에서 데이타교환 (0) | 2007.12.13 |
자바스크립트로 간단히 만드는 트리 (0) | 2007.12.12 |
Java Applet vs Java Servlet (0) | 2007.12.11 |