/** * Get the corresponding relative path for a file. * Handles jars specially. */ protected static String convertPathToRelative(File file) { String ret; if(file instanceof JarAsDirectory) { JarAsDirectory jar = (JarAsDirectory)file; if(jar.getZipEntry()!=null) ret = jar.getZipEntry().getName(); else ret = SUtil.convertPathToRelative(jar.getJarPath()); } else { ret = file!=null ? SUtil.convertPathToRelative(file.getAbsolutePath()): null; } return ret; }