/** * Constructs a relative path of a given component object, based on its absolute path. * * @param absolutePath * The given absolute path of the object. * @param component * The given component instance. * @return The relative path of the given component object. */ protected static String getRelativePathForComponentObject(String absolutePath, ComponentInfo component) { String path = absolutePath; if (component.rootDirPath != null && path != null) { File rootDir = new File(component.rootDirPath); path = FileUtil.getRelativePath(rootDir, path); } return path; }
String zipEntryName = (referenceDir != null) ? getRelativePath(referenceDir, entry .getAbsolutePath()) : getRelativePath(dir2zip, entry.getAbsolutePath()); ZipEntry zipEntry = new ZipEntry(zipEntryName); zoStream.putNextEntry(zipEntry);
if (counter > 0) { String relFilePath = FileUtil.getRelativePath(rootDir, file.getAbsolutePath()); insdObject.addInstallationAction(createFileAction(adjMainRoot + "/" + relFilePath, MAIN_ROOT));
+ FileUtil.getRelativePath(rootDir, aggDescFile.getAbsolutePath()); aggInsdObject.setMainComponentDesc(aggDescPath); cpBuffer.append(STANDARD_PATH_SEPARATOR_CHAR); cpBuffer.append(adjMainRoot + "/" + FileUtil.getRelativePath(dlgRootDir, jarFiles[n].getAbsolutePath())); if (dlgBinDir.isDirectory()) { String adjBinDirPath = adjMainRoot + "/" + FileUtil.getRelativePath(dlgRootDir, dlgBinDir.getAbsolutePath()); aggInsdObject.addInstallationAction(createEnvAction("CLASSPATH", adjBinDirPath)); aggInsdObject.addInstallationAction(createEnvAction("PATH", adjBinDirPath));