public class JWMacOS extends JWGenericOS
Modifier and Type | Class and Description |
---|---|
static class |
JWMacOS.IgnoreInputStream |
linInstance, macInstance, winInstance
Constructor and Description |
---|
JWMacOS() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canRunLauncher64()
Returns true if JWrapper will use the native launcher on
this version of OS X.
|
java.lang.String[] |
getAllConsoleUsers()
Get a list of all users logged in to the console (logged in to a graphical session)
|
static java.io.File |
getDotAppLauncher()
Returns a File referencing the .app used to launch this application.
|
java.lang.String |
getHostname() |
static java.lang.String |
getJvmUserAccount()
Get the username that is running this JVM
|
static JWMacOS |
getMacOSInstance() |
static java.io.File |
getNativeLauncherForDotApp(java.io.File dotApp)
Given a .app folder on OS X, return the native binary used to launch the application.
|
static java.io.File |
getParameterisationFile(java.io.File dotApp)
OS X dynamic parameters are written to a file in the app bundle.
|
static java.lang.String |
getRequestedURL()
Returns the requested URL if this application was launched using a URL handler
|
boolean |
killProcess(int pid)
Kill the process with the given PID
|
static boolean |
registerAppAsURLHandler(java.lang.String scheme,
java.lang.String bundleID)
Register a .app's bundleID to handle a particular URL scheme.
|
static void |
registerURLSchemeForVirtualApp(java.lang.String schemeProtocol,
java.lang.String virtualApp) |
static void |
requestUserAttention(boolean isCritical)
Request the user's attention.
|
static void |
setMyOSXAppBadge(java.lang.String text)
Set the badge for this app (the red decorator text that appears on the apps icon in the OSX dock)
|
static void |
setMyOSXAppName(java.lang.String name)
Set the name of this app as it appears in the menu bar in OSX
|
static void |
setOSXEventListener(JWOSXEventListener listener)
Register an OSX Event Listener to receive notifications of Apple events.
|
getCurrentProcessID, getInstance, getOSName, getOSNameWithBitness, getOSVersion, setCurrentDirectory, setReadableForAllUsers, setReadableForAllUsersAndWait, setWritableForAllUsers, setWritableForAllUsersAndWait, terminateProcess
public static JWMacOS getMacOSInstance()
public static void registerURLSchemeForVirtualApp(java.lang.String schemeProtocol, java.lang.String virtualApp) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public static boolean registerAppAsURLHandler(java.lang.String scheme, java.lang.String bundleID)
public static java.io.File getDotAppLauncher()
public static java.io.File getParameterisationFile(java.io.File dotApp)
public static boolean canRunLauncher64()
public static java.lang.String getJvmUserAccount()
public java.lang.String[] getAllConsoleUsers()
getAllConsoleUsers
in class JWGenericOS
public static void setMyOSXAppName(java.lang.String name)
name
- public static void setMyOSXAppBadge(java.lang.String text)
text
- public static void requestUserAttention(boolean isCritical)
isCritical
- whether this request is critical, if it is then (think?) the icon will bounce forever rather than a finite number of timespublic java.lang.String getHostname()
getHostname
in class JWGenericOS
public static java.io.File getNativeLauncherForDotApp(java.io.File dotApp)
dotApp
- the application folderpublic boolean killProcess(int pid)
public static void setOSXEventListener(JWOSXEventListener listener)
public static java.lang.String getRequestedURL()