Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGianMaria Romanato2017-01-05 12:17:19 -0500
committerGianMaria Romanato2017-01-05 12:17:19 -0500
commitb20cf6ce1de319b868fa1958ddbd018899adb18d (patch)
tree1d3b6016fbb584675511aac5cbfa933bbf23fd06
parentff801f5de114abc49d8c3cfa8f7631ecd653cb66 (diff)
downloadorg.eclipse.virgo.ide-feature/486353.tar.gz
org.eclipse.virgo.ide-feature/486353.tar.xz
org.eclipse.virgo.ide-feature/486353.zip
486353: Virgo 3.7 and 3.6.x does not support native library on Windowsfeature/486353
8.1 and Windows 10 Change Virgo35Provider to set system property os.name=win32 on Windows 10. Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=486353
-rw-r--r--org.eclipse.virgo.ide.runtime.core/src/org/eclipse/virgo/ide/runtime/internal/core/runtimes/Virgo35Provider.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/org.eclipse.virgo.ide.runtime.core/src/org/eclipse/virgo/ide/runtime/internal/core/runtimes/Virgo35Provider.java b/org.eclipse.virgo.ide.runtime.core/src/org/eclipse/virgo/ide/runtime/internal/core/runtimes/Virgo35Provider.java
index dcdf686..71c11fa 100644
--- a/org.eclipse.virgo.ide.runtime.core/src/org/eclipse/virgo/ide/runtime/internal/core/runtimes/Virgo35Provider.java
+++ b/org.eclipse.virgo.ide.runtime.core/src/org/eclipse/virgo/ide/runtime/internal/core/runtimes/Virgo35Provider.java
@@ -52,6 +52,7 @@ public class Virgo35Provider extends VirgoRuntimeProvider {
protected Virgo35Provider() {
}
+ @Override
public boolean isHandlerFor(IRuntime runtime) {
IPath configPath = runtime.getLocation().append(getConfigurationDir());
File configDir = configPath.toFile();
@@ -133,6 +134,12 @@ public class Virgo35Provider extends VirgoRuntimeProvider {
list.add("-Dssh.server.keystore=" + serverHome + "/" + getConfigurationDir() + "/hostkey.ser");
list.add("-Djava.endorsed.dirs=\"" + serverHome + "/lib/endorsed\"");
+ if (isWindows10()) {
+ // Work around for Equinox 3.9 not recognizing Windows 10 as win32, which results in failure of resolution
+ // of native libraries see https://bugs.eclipse.org/bugs/show_bug.cgi?id=486353
+ list.add("-Dos.name=win32");
+ }
+
String fwClassPath = createFWClassPath(serverHome);
list.add("-Dosgi.frameworkClassPath=" + fwClassPath);
@@ -140,6 +147,10 @@ public class Virgo35Provider extends VirgoRuntimeProvider {
return list.toArray(new String[list.size()]);
}
+ private boolean isWindows10() {
+ return System.getProperty("os.name", "").toLowerCase().contains("windows") && System.getProperty("os.version", "").startsWith("1"); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ }
+
private String createFWClassPath(String serverHome) {
StringBuilder fwClassPath = new StringBuilder();
File libDir = new File(serverHome + "/lib");

Back to the top