Trap and report errors failing to load non-available native libraries.
--- a/connectivity/com.nokia.tcf/src/com/nokia/tcf/impl/TCAPIConnection.java Wed Dec 09 15:39:08 2009 -0600
+++ b/connectivity/com.nokia.tcf/src/com/nokia/tcf/impl/TCAPIConnection.java Wed Dec 09 15:40:36 2009 -0600
@@ -46,7 +46,12 @@
} catch (UnsatisfiedLinkError e) {
// if Carbide DLL is not found in DE,
// try to load one from the plugin itself
- System.loadLibrary("TCFClient");
+ try {
+ System.loadLibrary("TCFClient");
+ } catch (UnsatisfiedLinkError e2) {
+ // no native TCF, e.g., not on Windows or in a misconfigured dev layout
+ e2.printStackTrace();
+ }
}
}
}
--- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java Wed Dec 09 15:39:08 2009 -0600
+++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java Wed Dec 09 15:40:36 2009 -0600
@@ -41,7 +41,12 @@
public class TRKConnectedService extends AbstractConnectedService {
static {
- System.loadLibrary("GetTRKVersion"); //$NON-NLS-1$
+ try {
+ System.loadLibrary("GetTRKVersion"); //$NON-NLS-1$
+ } catch (UnsatisfiedLinkError e) {
+ // no such library, e.g., not on Windows or in a misconfigured dev layout
+ e.printStackTrace();
+ }
}
public native static void getTRKVersionFromSerial(String portName,