private
void
init() {
FileInputStream is = null ;
try {
if (System.getProperty( " file.separator " ).equals( " / " ))
is = new FileInputStream( " ./config/db.properties " );
// 当file.separator=/时,表示,改系统为UNIX系统
else
is = new FileInputStream( " ./config/db.properties " );
// 当file.separator=时,表示,改系统为UNIX系统
} catch (FileNotFoundException e){
System.out.println( " File db.properties not found " );
}
FileInputStream is = null ;
try {
if (System.getProperty( " file.separator " ).equals( " / " ))
is = new FileInputStream( " ./config/db.properties " );
// 当file.separator=/时,表示,改系统为UNIX系统
else
is = new FileInputStream( " ./config/db.properties " );
// 当file.separator=时,表示,改系统为UNIX系统
} catch (FileNotFoundException e){
System.out.println( " File db.properties not found " );
}