import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
public class GetProInfo {
public static void main(String args[]){
System.out.println(new GetProInfo().getProInfo("endpoint"));
}
public String getProInfo(String tag) {
Properties pro=new Properties();
FileInputStream profis=null;
String path=" ";
try {
path=System.getenv("PRO_PATH"); // get system envirenment
profis=new FileInputStream(path+"//dean.properties");
pro.load(profis);
//pro.load(GetProInfo.class.getClassLoader().getResourceAsStream("dean.properties"));
String info=pro.getProperty(tag);
return info;
} catch (Exception e) {
e.printStackTrace();
return null;
}finally{
if(profis!=null){
try {
profis.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}