이클립스에서 속성 파일을 저장하고로드하기위한 코드가 있습니다. Eclipse 애플리케이션 프로젝트를 만들었습니다.이클립스에 저장된 속성 파일은 어디에 있습니까?
Properties properties = new Properties();
try {
String propertyFilePath = "smcho.properties";
// properties.load(new FileInputStream(propertyFilePath));
properties.setProperty("database", "values");
properties.store(new FileOutputStream(propertyFilePath), null);
// Now, re-read the property file
properties.load(new FileInputStream(propertyFilePath));
System.out.println(properties.getProperty("database"));
} catch (IOException e) {
e.printStackTrace();
}
그것은 잘 작동하지만 내 컴퓨터에서 smcho.properties
파일을 찾을 수 없습니다. 파일 경로를 절대 경로로 설정하면 파일이 저장되고 경로에서로드됩니다. 속성 파일은 속성 파일 이름과 함께 어디에 저장됩니까?