2006/11/24 (金) 07:40:22 ◆ ▼ ◇ [qwerty]public static void loadLibrary (String name) {
/*
* Include platform name to support different windowing systems
* on same operating system.
*/
String platform = Platform.PLATFORM;
/*
* Get version qualifier.
*/
String version = System.getProperty ("swt.version"); //$NON-NLS-1$
if (version == null) {
version = "" + MAJOR_VERSION; //$NON-NLS-1$
/* Force 3 digits in minor version number */
if (MINOR_VERSION < 10) {
version += "00"; //$NON-NLS-1$
} else {
if (MINOR_VERSION < 100) version += "0"; //$NON-NLS-1$
}
version += MINOR_VERSION;
/* No "r" until first revision */
if (REVISION > 0) version += "r" + REVISION; //$NON-NLS-1$
}
try {
String newName = name + "-" + platform + "-" + version; //$NON-NLS-1$ //$NON-NLS-2$
System.loadLibrary (newName);
return;
} catch (UnsatisfiedLinkError e1) {
try {
String newName = name + "-" + platform; //$NON-NLS-1$
System.loadLibrary (newName);
return;
} catch (UnsatisfiedLinkError e2) {
throw e1;
}
}