Bug 537266 - [launching] classpath should not contain JRE jars
Change-Id: Iab7c410bcbce35feaba58be512059b51bc283dce
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractJavaLaunchConfigurationDelegate.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractJavaLaunchConfigurationDelegate.java
index d02870a..4257b5f 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractJavaLaunchConfigurationDelegate.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractJavaLaunchConfigurationDelegate.java
@@ -429,10 +429,10 @@
List<String> userEntries = new ArrayList<>(entries.length);
Set<String> set = new HashSet<>(entries.length);
for (IRuntimeClasspathEntry entry : entries) {
- String location = entry.getLocation();
- if (location != null) {
- if (entry.getClasspathProperty() != IRuntimeClasspathEntry.MODULE_PATH
- && entry.getClasspathProperty() != IRuntimeClasspathEntry.PATCH_MODULE) {
+ if (entry.getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES
+ || entry.getClasspathProperty() == IRuntimeClasspathEntry.CLASS_PATH) {
+ String location = entry.getLocation();
+ if (location != null) {
if (!set.contains(location)) {
userEntries.add(location);
set.add(location);