Bug 559703 - Broken: warning "There are no JREs installed in the
workspace that are strictly compatible with this environment"

Change-Id: Iaf215f78024f6363544c131405f06fd67c4b6bbd
Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironment.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironment.java
index c9f6844..1b05fa8 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironment.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironment.java
@@ -478,6 +478,13 @@
 			}
 
 		}
+		// For below Java 9 EE, compiler release option should be disabled by default
+		String property = profile.getProperty(JavaCore.COMPILER_COMPLIANCE);
+		if (property != null) {
+			if (JavaCore.compareJavaVersions(property, JavaCore.VERSION_9) < 0) {
+				profile.setProperty(JavaCore.COMPILER_RELEASE, JavaCore.DISABLED);
+			}
+		}
 		return profile;
 	}