Well I'd simply use the String
methods startsWith(String sequence)
and check if it starts with classpath or filepath and call an approriate method from there to do the work:
String str=//extracted property tag
if(str.startsWith("filepath")) {
//simply intialize as URL and get inputstream from that
URL url =new URL(str);
URLConnection uc = url.openConnection();
InputStream is=uc.getInputStream();
} else if(str.startsWith("classpath")) {
//strip the classpath and then call method to extract from jar
}
See here for extracting resources from in a jar.