diff options
author | Thomas Watson | 2009-08-13 16:40:41 +0000 |
---|---|---|
committer | Thomas Watson | 2009-08-13 16:40:41 +0000 |
commit | bbcab8099ef416cf2fb522333c76e65610e9c720 (patch) | |
tree | dddc604e458fb0c1908a6e736452bec494b5824c /bundles/org.eclipse.equinox.launcher | |
parent | 781bbfd4d3dd9a3a82883822ac4519d555146bd5 (diff) | |
download | rt.equinox.framework-bbcab8099ef416cf2fb522333c76e65610e9c720.tar.gz rt.equinox.framework-bbcab8099ef416cf2fb522333c76e65610e9c720.tar.xz rt.equinox.framework-bbcab8099ef416cf2fb522333c76e65610e9c720.zip |
Bug 286037 [launcher] A launch config gives no message if it can not run
Diffstat (limited to 'bundles/org.eclipse.equinox.launcher')
-rw-r--r-- | bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java | 13 | ||||
-rw-r--r-- | bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java | 10 |
2 files changed, 20 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java index 72c919260..2acff6221 100644 --- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java +++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 IBM Corporation and others. + * Copyright (c) 2006, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -131,6 +131,17 @@ public class JNIBridge { } /** + * Whether or not we loaded the shared library here from java. + * False does not imply the library is not available, it could have + * been loaded natively by the executable. + * + * @return boolean + */ + boolean isLibraryLoadedByJava() { + return libraryLoaded; + } + + /** * @noreference This method is not intended to be referenced by clients. */ public boolean takeDownSplash() { diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java index 88801d2ed..c8488e0ff 100644 --- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java +++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java @@ -1346,9 +1346,15 @@ public class Main { private void setExitData() { String data = System.getProperty(PROP_EXITDATA); - if (data == null || bridge == null) + if (data == null) return; - bridge.setExitData(exitData, data); + //if the bridge is null then we have nothing to send the data to; + //exitData is a shared memory id, if we loaded the library from java, we need a non-null exitData + //if the executable loaded the library, then we don't need the exitData id + if (bridge == null || (bridge.isLibraryLoadedByJava() && exitData == null)) + System.out.println(data); + else + bridge.setExitData(exitData, data); } /** |