### Eclipse Workspace Patch 1.0 #P org.eclipse.pde.core Index: src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java,v retrieving revision 1.24 diff -u -r1.24 ProductExportOperation.java --- src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java 2 Jan 2008 19:58:41 -0000 1.24 +++ src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java 31 Jan 2008 17:35:19 -0000 @@ -146,23 +146,29 @@ File homeDir = new File(TargetPlatform.getLocation()); if (!hasLaunchers) { if (homeDir.exists() && homeDir.isDirectory()) { - buffer.append("absolute:file:"); //$NON-NLS-1$ - buffer.append(new File(homeDir, "startup.jar").getAbsolutePath()); //$NON-NLS-1$ + appendAbsolutePath(buffer, new File(homeDir, "startup.jar")); //$NON-NLS-1$ if (!TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$ - File file = new File(homeDir, "eclipse"); //$NON-NLS-1$ - if (file.exists()) { - buffer.append(",absolute:file:"); //$NON-NLS-1$ - buffer.append(file.getAbsolutePath()); - } - file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$ - if (file.exists()) { - buffer.append(",absolute:file:"); //$NON-NLS-1$ - buffer.append(file.getAbsolutePath()); + File file = null; + // try to retrieve the exact eclipse launcher path + if (System.getProperties().get("eclipse.launcher") != null) { //$NON-NLS-1$ + String launcherPath = System.getProperties().get("eclipse.launcher").toString(); //$NON-NLS-1$ + file = new File(launcherPath); + if (file.exists()) { + appendAbsolutePath(buffer, file); + } + } else { + file = new File(homeDir, "eclipse"); //$NON-NLS-1$ + if (file.exists()) { + appendAbsolutePath(buffer, file); + } + file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$ + if (file.exists()) { + appendAbsolutePath(buffer, file); + } } file = new File(homeDir, "libXm.so.2"); //$NON-NLS-1$ if (file.exists()) { - buffer.append(",absolute:file:"); //$NON-NLS-1$ - buffer.append(file.getAbsolutePath()); + appendAbsolutePath(buffer, file); } } } @@ -175,6 +181,14 @@ return buffer.toString(); } + private void appendAbsolutePath(StringBuffer buffer, File file) { + if (buffer.length() > 0) + buffer.append(","); //$NON-NLS-1$ + + buffer.append("absolute:file:"); //$NON-NLS-1$ + buffer.append(file.getAbsolutePath()); + } + private void createEclipseProductFile() { File dir = new File(fFeatureLocation, "temp"); //$NON-NLS-1$ if (!dir.exists() || !dir.isDirectory())