Class Library
java.lang.Object
org.eclipse.swt.internal.Library
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String(package private) static final Stringstatic final intThe JAVA and SWT versions(package private) static intSWT Major version number (must be >= 0)(package private) static intSWT Minor version number (must be in the range 0..999)(package private) static intSWT revision number (must be >= 0)(package private) static final String(package private) static final String(package private) static final String(package private) static final Stringstatic final intThe JAVA and SWT versionsstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Stringarch()(package private) static void(package private) static booleanExtract file with 'mappedName' into path 'extractToFilePath'.private static booleanextractResource(String resourceName, File outFile) static String(package private) static booleanstatic intJAVA_VERSION(int major, int minor, int micro) Returns the Java version number as an integer.(package private) static booleanload(String libName, StringBuilder message) static voidloadLibrary(String name) Loads the shared library that matches the version of the Java code which is currently running.static voidloadLibrary(String name, boolean mapName) Loads the shared library that matches the version of the Java code which is currently running.(package private) static long(package private) static StringmapLibraryName(String libName) (package private) static StringmapLibraryName(String libName, boolean replaceDylib) (package private) static Stringos()(package private) static intparseVersion(String version) static intSWT_VERSION(int major, int minor) Returns the SWT version number as an integer.
-
Field Details
-
MAJOR_VERSION
static int MAJOR_VERSIONSWT Major version number (must be >= 0) -
MINOR_VERSION
static int MINOR_VERSIONSWT Minor version number (must be in the range 0..999) -
REVISION
static int REVISIONSWT revision number (must be >= 0) -
JAVA_VERSION
public static final int JAVA_VERSIONThe JAVA and SWT versions -
SWT_VERSION
public static final int SWT_VERSIONThe JAVA and SWT versions -
USER_HOME
-
SEPARATOR
-
DELIMITER
-
JAVA_LIB_PATH
- See Also:
-
SWT_LIB_PATH
- See Also:
-
SUFFIX_64
- See Also:
-
SWT_LIB_DIR
-
-
Constructor Details
-
Library
public Library()
-
-
Method Details
-
arch
-
os
-
chmod
-
longConst
static long longConst() -
parseVersion
-
JAVA_VERSION
public static int JAVA_VERSION(int major, int minor, int micro) Returns the Java version number as an integer.- Returns:
- the version
-
SWT_VERSION
public static int SWT_VERSION(int major, int minor) Returns the SWT version number as an integer.- Returns:
- the version
-
extractResource
-
extract
Extract file with 'mappedName' into path 'extractToFilePath'. Does not overwrite existing file. Does not leave trash on error.- Parameters:
extractToFilePath- full path of where the file is to be extacted to, inc name of file, e.g /home/USER/.swt/lib/linux/x86_64/libswt-MYLIB-gtk-4826.somappedName- file to be searched in jar.- Returns:
- true upon success, failure if something went wrong.
-
isLoadable
static boolean isLoadable() -
load
-
loadLibrary
Loads the shared library that matches the version of the Java code which is currently running. SWT shared libraries follow an encoding scheme where the major, minor and revision numbers are embedded in the library name and this along withnameis used to load the library. If this fails,nameis used in another attempt to load the library, this time ignoring the SWT version encoding scheme.- Parameters:
name- the name of the library to load
-
loadLibrary
Loads the shared library that matches the version of the Java code which is currently running. SWT shared libraries follow an encoding scheme where the major, minor and revision numbers are embedded in the library name and this along withnameis used to load the library. If this fails,nameis used in another attempt to load the library, this time ignoring the SWT version encoding scheme.- Parameters:
name- the name of the library to loadmapName- true if the name should be mapped, false otherwise
-
mapLibraryName
-
mapLibraryName
-
getVersionString
- Returns:
- String Combined SWT version like 4826
-