set path log4j.properties ใน Eclipse

posted on 29 Jul 2010 23:54 by udomwit

สำหรับ Application standalone ที่มีการใช้งาน

PropertyConfigurator.configure("log4j.properties");

เวลารันมักจะที errror

java.io.FileNotFoundException: log4j.properties 

 ก็เพราะว่ามันหาไฟล์  log4j.properties  มันเจอ   

วิธีแก้คือทำให้ให้ eclipse มันเห็นไฟล์นี้ก็จบ 

1. ไปเลือก run configulation

2. เลือก tab ClassPath คลิก User Entries คลิก Advanced

3. เลือก Add External Folder

4. browse ไปยัง folder ที่เก็บไฟล์    log4j.properties

 

 

 

edit @ 30 Jul 2010 00:08:26 by udomwit