Community
Participate
Working Groups
If you try to run eclipse loading org.eclipse.core.launcher.Main from a directory not from startup.jar the method getRootURL return a directory without a trailler slash '/'. That way plugins couldn´t be loaded because detectplugins method don´t append a slash before "plugins" directory. So, I put a correction in the getRootURL see below : ******************************************************************* Main.java file ******************************************************************* package org.eclipse.core.launcher; public class Main { . . . /** * Returns url of the location this class was loaded from */ private URL getRootURL() throws MalformedURLException { if (rootLocation != null) return new URL(rootLocation); URL url = getClass().getProtectionDomain().getCodeSource().getLocation(); String path = decode(url.getFile()); path = new File(path).getAbsolutePath().replace(File.separatorChar,'/'); if ( path.endsWith(".jar")) //$NON-NLS-1$ path = path.substring(0, path.lastIndexOf("/")+1); //$NON-NLS-1$ ////////////////////////////////////////////////////////////////// // NEW CODE BLOCK // // Append a separator if you load this class from a directory // // not from startup.jar file. // ////////////////////////////////////////////////////////////////// if( !path.endsWith("/") ) { path += '/'; } //////////////////////////////////////////////////////////// url = new URL(url.getProtocol(), url.getHost(), url.getPort(), path); // It seems that you don´t need this line. // rootLocation = url.toExternalForm(); return url; } }
Moving to Equinox for comment. This code has changed drastically in the past few months.
we run with startup in a dir all the time now. closing as fixed.