if (unoilPath == null)
return;
File unoilFile = new File(unoilPath + File.separator + "unoil.jar");
JarFileSystem jfs = new JarFileSystem();
try {
jfs.setJarFile(unoilFile);
}
catch (IOException ioe) {
return;
}
catch (PropertyVetoException pve) {
return;
}
FileSystem result;
try {
result =
Repository.getDefault().findFileSystem(jfs.getSystemName());
}
catch(Exception exp) {
result = null;
}
finally {
jfs.removeNotify();
}
if(result == null) {
// warnBeforeMount();
JarFileSystem newjfs = new JarFileSystem();
try {
newjfs.setJarFile(unoilFile);
}
catch (IOException ioe) {
return;
}
catch (PropertyVetoException pve) {
return;
}
Repository.getDefault().addFileSystem(newjfs);
newjfs.setHidden(true);
}
}