public class Platform extends Object
is64Bits()
isUnix()
open(File)
, open(URL)
, show(File)
Modifier and Type | Class and Description |
---|---|
static class |
Platform.DeleteFiles |
Modifier and Type | Field and Description |
---|---|
static int |
CLONG_SIZE |
static int |
POINTER_SIZE |
static int |
SIZE_T_SIZE |
static int |
TIME_T_SIZE |
static boolean |
useUnicodeVersionOfWindowsAPIs
Whether to use Unicode versions of Windows APIs rather than ANSI versions
(for functions that haven't been bound yet : has no effect on functions
that have already been bound).
|
static int |
WCHAR_T_SIZE |
Constructor and Description |
---|
Platform() |
Modifier and Type | Method and Description |
---|---|
static void |
addEmbeddedLibraryResourceRoot(String root)
BridJ is able to automatically extract native binaries bundled in the
application's JARs, using a customizable root path and a predefined
architecture-dependent subpath.
|
static ClassLoader |
getClassLoader() |
static ClassLoader |
getClassLoader(Class<?> cl) |
static String |
getMachine()
Machine (as returned by `uname -m`, except for i686 which is actually
i386), adjusted to the JVM platform (32 or 64 bits)
|
static URL |
getResource(String path) |
static InputStream |
getResourceAsStream(String path) |
static void |
initLibrary() |
static boolean |
is64Bits() |
static boolean |
isAmd64Arch() |
static boolean |
isAndroid() |
static boolean |
isArm() |
static boolean |
isBSD() |
static boolean |
isLinux() |
static boolean |
isMacOSX() |
static boolean |
isSolaris() |
static boolean |
isSparc() |
static boolean |
isUnix() |
static boolean |
isWindows() |
static boolean |
isWindows7() |
static void |
open(File file)
Opens a file with the default system action.
|
static void |
open(URL url)
Opens an URL with the default system action.
|
static void |
show(File file)
Show a file in its parent directory, if possible selecting the file (not
possible on all platforms).
|
public static final int POINTER_SIZE
public static final int WCHAR_T_SIZE
public static final int SIZE_T_SIZE
public static final int TIME_T_SIZE
public static final int CLONG_SIZE
public static boolean useUnicodeVersionOfWindowsAPIs
public Platform()
public static ClassLoader getClassLoader()
public static ClassLoader getClassLoader(Class<?> cl)
public static InputStream getResourceAsStream(String path)
public static URL getResource(String path)
public static void addEmbeddedLibraryResourceRoot(String root)
addEmbeddedLibraryResourceRoot("my/company/lib/")
, BridJ
will look for library in the following locations :
public static void initLibrary()
public static boolean isLinux()
public static boolean isMacOSX()
public static boolean isSolaris()
public static boolean isBSD()
public static boolean isUnix()
public static boolean isWindows()
public static boolean isWindows7()
public static String getMachine()
public static boolean isAndroid()
public static boolean isArm()
public static boolean isSparc()
public static boolean is64Bits()
public static boolean isAmd64Arch()
public static final void open(URL url) throws NoSuchMethodException
url
- url to openNoSuchMethodException
- if opening an URL on the current platform
is not supportedpublic static final void open(File file) throws NoSuchMethodException
file
- file to openNoSuchMethodException
- if opening a file on the current platform
is not supportedpublic static final void show(File file) throws NoSuchMethodException, IOException
file
- file to show in the system's default file navigatorNoSuchMethodException
- if showing a file on the current platform
is not supportedIOException
Copyright © 2009-2020. All Rights Reserved.