mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add sa-jdi.jar to classpath if available - for IDEA-168185
This commit is contained in:
@@ -40,6 +40,7 @@ public class BootstrapClassLoaderUtil extends ClassUtilCore {
|
||||
addIDEALibraries(classpath);
|
||||
addAdditionalClassPath(classpath);
|
||||
addParentClasspath(classpath, true);
|
||||
addSAJDIJar(classpath);
|
||||
|
||||
UrlClassLoader.Builder builder = UrlClassLoader.build()
|
||||
.urls(filterClassPath(new ArrayList<>(classpath)))
|
||||
@@ -134,6 +135,16 @@ public class BootstrapClassLoaderUtil extends ClassUtilCore {
|
||||
parseClassPathString(System.getProperty(PROPERTY_ADDITIONAL_CLASSPATH), classpath);
|
||||
}
|
||||
|
||||
/**
|
||||
* search and add sa-jdi.jar if available, currently works only for IDEA updated from sources
|
||||
*/
|
||||
private static void addSAJDIJar(Collection<URL> classpath) throws MalformedURLException {
|
||||
File saJdiJar = new File(System.getProperty("java.home"), "../lib/sa-jdi.jar");
|
||||
if (saJdiJar.exists()) {
|
||||
classpath.add(saJdiJar.toURI().normalize().toURL());
|
||||
}
|
||||
}
|
||||
|
||||
private static void parseClassPathString(String pathString, Collection<URL> classpath) {
|
||||
if (pathString != null && !pathString.isEmpty()) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user