BufferedReader bf = null;
FileInputStream in = null;
try {
String asenv="";
if(isUnix()) {
asenv = installDir + File.separator + CONFIG + File.separator +
ASENVCONF;
} else {
asenv = installDir + File.separator + CONFIG + File.separator +
ASENVBAT;
}
logger.log(Level.FINER, asenv);
in = new FileInputStream(asenv);
String antLib = "";
bf = new BufferedReader(new InputStreamReader(in));
String line = bf.readLine();
while(line != null) {
logger.log(Level.FINER,line);
String[] asantLine = line.split(ASANTREGEX);
if (asantLine.length > 1) {
if (isUnix()) {
asantLine = asantLine[1].split("\"");
}
antLib = asantLine[1];
logger.log(Level.FINER,"antLib "+antLib);
return new File(antLib);
}
line = bf.readLine();
}
return null;
}catch(Exception e) {
logger.log(Level.SEVERE,e.getMessage(), e);
throw new AddonFatalException(e);
} finally {
try {
if(bf != null)
bf.close();
if(in != null)
in.close();
} catch (Exception e) {
logger.log(Level.WARNING,e.getMessage(), e);
}
}