public final class SFMLNative extends Object
for more information.
Modifier and Type | Field and Description |
---|---|
static String |
OS_NAME_LINUX
The substring of the
os.name system property
to look for to detect Linux systems. |
static String |
OS_NAME_MACOSX
The substring of the
os.name system property
to look for to detect Mac OS X systems. |
static String |
OS_NAME_WINDOWS
The substring of the
os.name system property
to look for to detect Windows systems. |
Constructor and Description |
---|
SFMLNative() |
Modifier and Type | Method and Description |
---|---|
static void |
ensureDisplay()
Ensures that a display is available on this system.
|
static void |
loadNativeLibraries()
Loads the native JSFML libraries if it has not been done yet.
|
public static final String OS_NAME_WINDOWS
os.name
system property
to look for to detect Windows systems.public static final String OS_NAME_LINUX
os.name
system property
to look for to detect Linux systems.public static final String OS_NAME_MACOSX
os.name
system property
to look for to detect Mac OS X systems.public static void loadNativeLibraries()
os.name
and os.arch
system properties and
compile a list of libraries to load if the platform is supported. The libraries will
then be looked for in the classpath, extracted to the user directory and loaded.
The libraries will be extracted to ~/.jsfml
. If the files already exist, their MD5
hashes (which are provided in separate files) will be tested against the ones in the
classpath. If the MD5 hashes differ, the existing file in the user directory will
be overridden.
If loading the native libraries fails, a JSFMLError
will be raised with
a brief description of what went wrong.public static void ensureDisplay()
HeadlessException
is thrown to indicate that the desired
JSFML feature is not available.