Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2020-03-25 14:53:10 +0000
committerThomas Watson2020-03-25 14:53:10 +0000
commitb45bfb313ecb7bcdce5acfe0c2e88d77a7b5269d (patch)
treef9c3591c6d30ec875b8df894a59240bfffe6d36b /bundles/org.eclipse.osgi
parent2b5c61464a1f5bb4287dc86047ab5d7c7cdb7a09 (diff)
downloadrt.equinox.framework-b45bfb313ecb7bcdce5acfe0c2e88d77a7b5269d.tar.gz
rt.equinox.framework-b45bfb313ecb7bcdce5acfe0c2e88d77a7b5269d.tar.xz
rt.equinox.framework-b45bfb313ecb7bcdce5acfe0c2e88d77a7b5269d.zip
Update default profile to be Java 8
Equinox is compiled to Java 8 so default to that profile if the current running Java version cannot be determined Change-Id: I92e834113ad08e5b779d428ed27ae02dd06e2581 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
index 0671a94c9..80366b289 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
@@ -188,8 +188,9 @@ public class Storage {
}
private Storage(EquinoxContainer container, String[] cachedInfo) throws IOException {
- // default to Java 7 since that is our min
- Version javaVersion = Version.valueOf("1.7"); //$NON-NLS-1$
+ // default to Java 8 since that is our min
+ Version defaultVersion = Version.valueOf("1.8"); //$NON-NLS-1$
+ Version javaVersion = defaultVersion;
// set the profile and EE based off of the java.specification.version
String javaSpecVersionProp = System.getProperty(EquinoxConfiguration.PROP_JVM_SPEC_VERSION);
StringTokenizer st = new StringTokenizer(javaSpecVersionProp, " _-"); //$NON-NLS-1$
@@ -204,6 +205,12 @@ public class Storage {
} catch (IllegalArgumentException e) {
// do nothing
}
+ if (javaVersion.compareTo(defaultVersion) < 0) {
+ // the Java specification property is wrong, we are compiled to the
+ // defaultVersion
+ // just use it instead.
+ javaVersion = defaultVersion;
+ }
runtimeVersion = javaVersion;
javaSpecVersion = javaSpecVersionProp;
mruList = new MRUBundleFileList(getBundleFileLimit(container.getConfiguration()), container.getConfiguration().getDebug());
@@ -1770,7 +1777,7 @@ public class Storage {
}
if (profileIn == null)
// the profile url is still null then use the min profile the framework can use
- profileIn = findInSystemBundle(systemGeneration, "JavaSE-1.7.profile"); //$NON-NLS-1$
+ profileIn = findInSystemBundle(systemGeneration, "JavaSE-1.8.profile"); //$NON-NLS-1$
if (profileIn != null) {
try {
result.load(new BufferedInputStream(profileIn));

Back to the top