Reading files outside Jar for MAC OS
Dear all,
I'm using the following code to read files outside the jar and it works fine under windows bt its giving me problems under MAC. Can any one see where the problem is....
Thanks
try{
URL url = FileParser.class.getResource("/images/hand.gif");
str=url.toString();
if(str.startsWith("jar:file:")){
String fn = str.substring(10);
int n = fn.indexOf("!");
if(n == -1)
n = fn.length();
fn = fn.substring(0,n);
n = fn.lastIndexOf("/");
fn = fn.substring(0,n+1);
str=fn+ur;
str=str.replaceAll("%20"," ");
}
else{
URL url2 = FileParser.class.getResource(ur);
str = url2.toString().replaceAll("%20"," ").substring(6);
}
}
catch (Exception npe){}

